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

Martin v. Loewis martin at v.loewis.de
Thu Nov 7 16:11:41 EST 2002


bokr at oz.net (Bengt Richter) writes:

> Ok, sorry, does
>      BIT31 = 1L<<31
> work?

Not if you assume the original complaint from Jon Ribbens: If long
literals become an error in some future Python release, this code will
stop working.

Regards,
Martin




More information about the Python-list mailing list