Issue 4682: 'b' formatter is actually unsigned char (original) (raw)

The 'b' format unit to PyArg_ParseTuple, PyArg_ParseTupleAndKeywords, and PyArg_Parse is described in the documentation (in Parsing arguments and building values) as representing a signed char, but actually represents an unsigned char.

Personally, I would say that this is a problem with the interpreter core, but 'b' has been an unsigned char since 2000 and fixing it now would probably break backwards compatibility of extensions.