Author smarnach
Recipients MSeifert, Will Roberts, mark.dickinson, rhettinger, serhiy.storchaka, smarnach
Date 2017-06-07.10:00:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496829649.48.0.20171348112.issue30537@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-06-07 10:00:49smarnachsetrecipients: + smarnach, rhettinger, mark.dickinson, serhiy.storchaka, MSeifert, Will Roberts
2017-06-07 10:00:49smarnachsetmessageid: <1496829649.48.0.20171348112.issue30537@psf.upfronthosting.co.za>
2017-06-07 10:00:49smarnachlinkissue30537 messages
2017-06-07 10:00:49smarnachcreate