On Thu, 9 Jun 2022 at 01:12, Steve Jorgensen wrote:
>
> My current thinking in response to that is that using islice is a decent
> solution except that it's not obvious. You have to jump outside of the
> thinking about the destructuring capability and consider what else could be
> used to help.
would it not be possible to have slicing fallback to islice if __iter__ is
implemented and __geitem__ is not?
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/m
On 09/06/2022 09:50, Paul Moore wrote:
On Thu, 9 Jun 2022 at 01:12, Steve Jorgensen wrote:
My current thinking in response to that is that using islice is a decent
solution except that it's not obvious. You have to jump outside of the thinking
about the destructuring capability and conside
Mathew Elman writes:
> would it not be possible to have slicing fallback to islice if
> __iter__ is implemented and __geitem__ is not?
The syntax is well-defined, but the semantics are not.
Consider "g[101]; g[100]" for g a generator object. This either
requires all generators to keep a cache
> On 09/06/2022 09:50, Paul Moore wrote:
> > On Thu, 9 Jun 2022 at 01:12, Steve Jorgensen wrote:
> >> My current thinking in response to that is that using islice is a decent
> >> solution except that it's not obvious. You have to jump outside of the
> >> thinking about the destructuring capabil