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

Tim Peters tim.one at comcast.net
Thu Nov 7 15:37:44 EST 2002


[Bengt Richter]
> Ok, sorry, does
>      BIT31 = 1L<<31
> work?

Yes, and means exactly the same thing as 0x80000000L.  Both are identical in
respect of what the OP doesn't like about them too (that accepting trailing
'L' is slated to be removed in Python 3).





More information about the Python-list mailing list