[Python-3000] Using range()
Mark Dickinson
dickinsm at gmail.com
Thu Apr 24 17:15:10 CEST 2008
On Thu, Apr 24, 2008 at 10:58 AM, "Martin v. Löwis" <martin at v.loewis.de>
wrote:
> >>>> r = range(10000000000000000000)
> >>>> r[0]
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > OverflowError: Python int too large to convert to C ssize_t
> >
> > This is a bug, right?
>
> I'd call it an implementation limitation.
>
It is a bit surprising, especially given
that the following works:
>>> r = range(10**19-100, 10**19)
>>> r[0]
9999999999999999900
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-3000/attachments/20080424/37431c19/attachment.htm>
More information about the Python-3000
mailing list