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

Ka-Ping Yee ping@zesty.ca
Wed, 17 Jul 2002 14:58:55 -0500 (CDT)


On Wed, 17 Jul 2002, Guido van Rossum wrote:
> Given that it's really only a very minor problem, I'd rather not
> expend the effort to 'fix" this.

I do agree that there is a policy decision to be made about
when it's appropriate to make a protocol change, and that this
should be left to you, Guido.

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.

So it's worth thinking through.


-- ?!ng