A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-May/003906.html below:

[Python-Dev] Cannot declare the largest integer literal.

[Python-Dev] Cannot declare the largest integer literal. [Python-Dev] Cannot declare the largest integer literal.Mark Hammond mhammond@skippinet.com.au
Wed, 3 May 2000 09:12:18 +1000
> >>> 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.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4