18 Mar
2021
18 Mar
'21
11:44 p.m.
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?
Yes, only one obvious way and all that, but inside eg __getitem__ it
seems to me that:
if isinstance(index, slice):
for i in index:
... do stuff with i ...
is the obvious thing to do.
Cheers,
Cameron Simpson