[issue6305] islice doesn't accept large stop values

Alok Singhal report at bugs.python.org
Sun Jun 22 17:48:03 CEST 2014


Alok Singhal added the comment:

Hi Raymond, Martin,

I won't feel bad about this patch not making it into the final Python distribution.  I worked on this bug because it was the only "core C" bug at PyCon US sprints for CPython.  I learned a bit more about CPython while working on it and I don't consider the time I spent on this bug as wasted.

Other than symmetry arguments, I can't think of any other argument for islice to accept large values.

  a = []
  a[sys.maxsize+2:] # gives: []
  islice(a, None, sys.maxsize+2) # raises exception

But because islice has to go through the elements of the iterable from the current value to "start", while the first example doesn't, I don't think the symmetry argument is that strong here.

So, I think it's fine if we close this bug without accepting this patch.

Thanks for your time in reviewing it!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6305>
_______________________________________


More information about the Python-bugs-list mailing list