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

Martin v. Löwis loewis at informatik.hu-berlin.de
Thu Nov 7 13:35:52 EST 2002


Jon Ribbens <jon+usenet at unequivocal.co.uk> writes:

> > 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!

> 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.

Regards,
Martin



More information about the Python-list mailing list