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

Aahz aahz at pythoncraft.com
Thu Nov 14 15:14:05 EST 2002


In article <Pnfy9.2862$h%5.101642 at newsb.telia.net>,
Fredrik Lundh <fredrik at pythonware.com> wrote:
>Tim Peters wrote:
>>>
>>> What am I supposed to do to make the warning go away? Rewrite 0x80000000
>>> as 0x40000000 * 2 ? ;-)
>>
>> Write it in a platform-independent way.  If you *intended* this literal to
>> mean "a 1 bit followed by 31 zero bits", then stick an L on the end of the
>> literal.
>
>...and remove it again when you get to Python 2.5.

Why?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

A: No.
Q: Is top-posting okay?



More information about the Python-list mailing list