[Python-3000] range() issues
Alexander Belopolsky
alexander.belopolsky at gmail.com
Wed Apr 30 04:58:44 CEST 2008
On Tue, Apr 29, 2008 at 5:18 PM, Benjamin Peterson
<musiccomposition at gmail.com> wrote:
..
> > Put another way: range(n) currently works, in Py3k, for n > sys.maxsize.
> > What's the rationale for breaking that?
>
> So we can support other sequence methods. (I think.)
>
This is not true. The missing sequence methods are slicing and
__contains__ and neither requires len <= sys.maxsize . The rationale
was that a huge range is most likely a programming or input error
which is detected early in 2.x while in 3.x may result in strange
errors later on.
More information about the Python-3000
mailing list