[Python-Dev] Cannot declare the largest integer literal. (original) (raw)
Mark Hammond mhammond@skippinet.com.au
Wed, 3 May 2000 09:12:18 +1000
- Previous message: [Python-Dev] Cannot declare the largest integer literal.
- Next message: [Python-Dev] Cannot declare the largest integer literal.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>> i = -2147483648 OverflowError: integer literal too large >>> i = -2147483648L >>> int(i) # it is a valid integer literal -2147483648
I struck this years ago! At the time, the answer was "yes, its an implementation flaw thats not worth fixing".
Interestingly, it does work as a hex literal:
0x80000000 -2147483648 -2147483648 Traceback (OverflowError: integer literal too large
Mark.
- Previous message: [Python-Dev] Cannot declare the largest integer literal.
- Next message: [Python-Dev] Cannot declare the largest integer literal.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]