PEP 234: Iterators

Stephen Hansen news at myNOSPAM.org
Thu May 3 02:04:31 EDT 2001


"Andrew Dalke" <dalke at acm.org> wrote in message
news:9cqr4q$79q$1 at nntp9.atl.mindspring.net...
> Stephen Hansen wrote:
> I can't think of a better name.  Stephen suggests "iterate"
> and "iterator" but I feel those names are too close in spelling.
> I've noticed that I end up only reading the first few characters
> and leaving the rest up to the shape of the word.  These two
> words have similar shapes.

    You're right, they do sound far too alike.. so, use 'traverse(iterator)'
for the first case, and 'iterator(function, sentinal)' for the second one.
In the former, we are traversing an iterator, while in the latter one, we
are actually making an iterator out of a function.

--S





More information about the Python-list mailing list