I whinged:
>> On Fri, Mar 19, 2021 at 10:46 AM Cameron Simpson <c...@cskk.id.au> wrote:
>> > I know that range(start,end,stride) will produce what I'd want from
>> > iter(slice(start,end,stride)), but wouldn't it be reasonable for a slice
>> > itself to be iterable? [...]

>On Thu, Mar 18, 2021 at 6:09 PM Chris Angelico <ros...@gmail.com> 
>wrote:
>> What if the start is positive and the end is negative? What values should
>> i get?

On 18Mar2021 19:15, Caleb Donovick <donov...@cs.stanford.edu> wrote:
>Or perhaps more problematic what happens if only stride is specified?

I'd be happy if the behaviour were the same as range(), yea even to 
being a concise way to spell range(slice.start,slice.end,slide.stride); 
who wants to say that if iter(slice) means the same thing?

For only stride, ValueError. For positive stride and start > end, empty 
iteration.

Cheers,
Cameron Simpson <c...@cskk.id.au>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/CKYOIISUXXV3SCSFQFWQYENED3GQU2L6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to