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

Jon Ribbens jon+usenet at unequivocal.co.uk
Thu Nov 7 14:20:29 EST 2002


In article <j4k7jpz0qf.fsf at informatik.hu-berlin.de>, Martin v. Löwis wrote:
>> > I would still recommend to use 0x8000000L instead; it saves you one
>> > computation, and is more readable.
>> 
>> But that *won't work* on later versions of Python! 
> 
> How do you know? Later versions of Python have not been released!

Because PEP237 tells me so ;-)

>> It means I will have a line in my code which I know will suddenly
>> stop working at some point in the future and I will have to make a
>> new release and everyone will have to upgrade their copies of my
>> module just because I put in code which I knew wasn't going to work.
> 
> Yes, provided your code is still in use when that happens.

Ooh, bitchy.



More information about the Python-list mailing list