[Python-Dev] Cannot declare the largest integer literal. (original) (raw)
Greg Stein gstein@lyra.org
Mon, 8 May 2000 14:54:31 -0700 (PDT)
- 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 ]
On Mon, 8 May 2000, Christian Tismer wrote:
... > So long as negative literals don't exist in the grammar, "-2147483648" makes > no sense on a 2's-complement machine with 32-bit C longs. There isn't "a > problem" here worth fixing, although if there is , it will get fixed > by magic as soon as Python ints and longs are unified.
I'd change the grammar.
That would be very difficult, with very little positive benefit. As Mark said, use 0x80000000 if you want that number.
Consider that the grammar would probably want to deal with things like
- 1234 or -0xA
Instead, the grammar sees two parts: "-" and "NUMBER" without needing to complicate the syntax for NUMBER.
Cheers, -g
-- Greg Stein, http://www.lyra.org/
- 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 ]