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

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

[Python-Dev] Single- vs. Multi-pass iterability [Python-Dev] Single- vs. Multi-pass iterabilityGuido van Rossum guido@python.org
Wed, 17 Jul 2002 16:04:12 -0400
> But i think this is more than a minor problem.  This is a
> namespace collision problem, and that's significant.  Naming
> the method "next" means that any object with a "next" method
> cannot be adapted to support the iterator protocol.  Unfortunately
> "next" is a pretty common word and it's quite possible that such
> a method name is already in use.

Can you explain this?  Last time I checked CVS, PEP 246 wasn't
implemented yet, so I don't think you mean "adapted" in that sense.
Generally speaking, iterator implementations aren't created by making
changes to an existing class -- they're created by creating new a
class.  The only change to *existing* classes needed is the addition
of an __iter__ method to the underlying container object.  So I'm not
sure what you mean.

--Guido van Rossum (home page: http://www.python.org/~guido/)




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