Negative long literals (was Re: Does Python need a '>>>' operator?)

Tim Peters at
Mon Jun 10 14:19:09 CEST 2002

[Beni Cherniavksy]
> I just got another idea: use 0x1234 for 0-filled numbers and 1xABCD for
> 1-filled ones.  That way you impose no restrictions on what follows the
> prefix and keep backward compatibility.  0xFFFFFFFF stays a 2^n-1
> _positive_ number, as it should be.  The look of 1x is weird at first but
> it is very logical...

Indeed, on both counts <wink>.  I like it a lot!

For the other points related to getting rid of machine long-size
assumptions, see PEP 237:  <>.

More information about the Python-list mailing list