hex/oct constants > sys.maxint will return positive values in Python 2.4 and up

Tim Peters tim.one at comcast.net
Wed Nov 6 21:36:45 EST 2002


[Jon Ribbens]
> Why do you think that will make any difference? I just want to set
> bit 31 of the integer, and I don't care if the integer is 32 bits
> signed, 32 bits unsigned, or >32 bits, I just want to set bit 31,

Python the language doesn't have 32 bit integers, and that's the point.  The
literal 0x80000000 means entirely different things on different Python
platforms today.  In Python 2.4, it will mean the same thing across
platforms.





More information about the Python-list mailing list