range or xrange disallowed for big numbers
Chad Netzer
cnetzer at mail.arc.nasa.gov
Tue Oct 8 15:52:54 EDT 2002
On Tuesday 08 October 2002 02:21, Joerg Woelke wrote:
> Both work here on a tru64 OS.
>
> >>> range(10000000000L, 10000000000L + 1L)
>
> [10000000000]
Granted, the specific examples will work on 64 bit machines, but the
principle remains (try this:)
range( 10L**20, 10L**20L+1L)
Of course, one could argue that number ranges that require longs, aren't that
common in practise (especially w/ 64 bits).
However, with auto-promotion of python ints to longs, I think it makes sense
to support these ranges from a consistency standpoint (especially since it
seems possible to do so with relatively minor work)
In fact, I'll code up an implementation to do it (and write the PEP, if
people approve of it)
--
Chad Netzer
cnetzer at mail.arc.nasa.gov
More information about the Python-list
mailing list