[Python-Dev] PyArg_ParseTuple format string: "h" vs. "H"
Just van Rossum
Thu, 16 Aug 2001 20:27:48 +0200
Guido van Rossum wrote:
> Jack complained about it too, but in the end agreed he'd update his
I don't mind updating my code at all, it's writing special cases to be
compatible with multiple Python versions that is, erm, yucky.
> If you really want compatibility without ifdefs and don't care about
> the range checks, you can use an i format and an int variable, and
> cast the int to (unsigned short) when using it.
That's how I did it.