I was curious if someone knew about the rationale for the ages-old behavior of PyArg_ParseTuple
format codes for unsigned integers, none of which checks for overflow (while their signed counterparts do).
For example:
h
(int
) [short int]
Convert a Python integer to a C short int.
H
(int
) [unsigned short int]
Convert a Python integer to a C unsigned short int, without overflow checking.
(from Parsing arguments and building values — Python 3.12.0 documentation)