[Python-Dev] Single- vs. Multi-pass iterability
Guido van Rossum
guido@python.org
Fri, 19 Jul 2002 17:20:35 -0400
> Guido van Rossum wrote:
> > - There really isn't anything "broken" about the current situation;
> > it's just that "next" is the only method name mapped to a slot in
> > the type object that doesn't have leading and trailing double
> > underscores.
>
> Are you saying the _only_ reason to rename it is for consistency with
> the other type slot method names? That's really weak, IMHO, and not
> worth any kind of backwards incompatibility (which seems unavoidable).
>
> Neil
Almost. This means that we're retroactively saying that all objects
with a next method are iterators, thereby slightly stomping on the
user's namespace. But as long a you don't use such an object as an
iterator, it's harmless.
And if my position wasn't clear already, I agree it's not worth
"fixing". :-)
--Guido van Rossum (home page: http://www.python.org/~guido/)