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/026603.html below:

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

[Python-Dev] Single- vs. Multi-pass iterability [Python-Dev] Single- vs. Multi-pass iterabilityDavid Abrahams David Abrahams" <david.abrahams@rcn.com
Mon, 15 Jul 2002 23:30:07 -0400
From: "Andrew Koenig" <ark@research.att.com>

> I wasn't suggesting defining a protocol for every possible iteration
> view.  I was raising the question of whether multi-pass iteration
> was likely to be a common enough operation that it is worth defining
> a protocol for it, while leaving the door open to defining protocols
> for others should it turn out to be desirable to do so.

I think your examples are confusing different beasts, then. Multipass
(=copyable in these examples) should be a capability of iterators, just as
bidirectional or random-access would be. Breadth-first/depth-first is not a
capability of the iterator in that sense, but an implementatoin detail --
from the POV of the iterator's user, there's no way to tell what the
traversal order is.

-Dave







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