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

Clark C . Evans cce@clarkevans.com
Wed, 17 Jul 2002 16:11:44 -0400


On Wed, Jul 17, 2002 at 02:58:55PM -0500, Ka-Ping Yee wrote:
| 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.

Right, but such objects wouldn't be mis-leading beacuse they'd
be missing a __iter__ method, correct?

Best,

Clark