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

Fredrik Lundh fredrik at pythonware.com
Wed Nov 6 15:58:23 EST 2002


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.

</F>





More information about the Python-list mailing list