[Python-ideas] Suggestion: Extend integers to include iNaN

Chris Angelico rosuav at gmail.com
Sun Sep 30 10:22:07 EDT 2018

On Mon, Oct 1, 2018 at 12:18 AM David Mertz <mertz at gnosis.cx> wrote:
> For similar reasons, I'd like an iInf too, FWIW.  It's good for an overflow value, although it's hard to get there in Python ints (would 'NaNAwareInt(1)/0' be an exception or iInf?).  Bonus points for anyone who knows the actual maximum size of Python ints :-).

Whatever the maximum is, it's insanely huge. I basically consider that
a Python int is as large as your computer has memory to store. I can
work with numbers so large that converting to string takes a notable
amount of time (never mind about actually printing it to a console,
just 'x = str(x)' pauses the interpreter for ages). If there's a
limit, it'll probably be described as something like 2**2**2**N for
some ridiculously large N.

Want to share what the maximum actually is? I'm very curious!


More information about the Python-ideas mailing list