Sven Marnach added the comment:

The current behaviour of islice() seems inconsistent with the rest of Python.  
All other functions taking start, stop and step arguments like slice(), range() 
and itertools.count() do accept integer-like objects.  The code given as 
"roughly equivalent" in the documentation of islice() accepts integer-like 
objects, and so does regular list slicing.  In fact, the __index__() method was 
introduced in PEP 357 specifically for slicing.  In Python 2, islice() 
supported it as well.  I think the expectation that islice() in Python 3 also 
supports it is entirely reasonable, and I can't see any strong arguments for 
breaking that assumption.

----------
nosy: +smarnach

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30537>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to