A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026366.html below:

[Python-Dev] Single- vs. Multi-pass iterability

[Python-Dev] Single- vs. Multi-pass iterability [Python-Dev] Single- vs. Multi-pass iterabilityAndrew Koenig ark@research.att.com
Fri, 12 Jul 2002 13:02:15 -0400 (EDT)
>>>>>> "AK" == Andrew Koenig <ark@research.att.com> writes:

Barry> Would it be useful to add to the interator "interface" a
Barry> method which would retrieve the original iterable object?

AK> What if there isn't one?

Barry> The method would return None.

But then you can't rely on it.  That is, if you want to write code
that depends on the ability to retrieve the original iterable,
you have to give up the ability for that code to work on
generators, for example.

I'm not saying it's not a useful thing to have; I'm just saying
it might not be as useful as it appears at first.






RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4