[Python-Dev] 'iter' as a function name

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Mon, 23 Apr 2001 19:45:18 +0200


I should probably be silent on the issue of picking names for things,
but I feel that 'iter' is an unfortunte choice for a function name: it
is an abbreviated word. Now, you could argue that there is plenty of
precedent for that in Python, but some of these are also
confusing. Just today, I asked colleague what he thought 'repr' might
do, and he had no clue.

Anyway, I've been browsing dictionaries somewhat, and here are a few
proposals, taking a well-known dictionary as an argument:

harp(sys.modules)      # or harp_on(sys.modules)?
traverse(sys.modules)  # not shorter than iterate, though...
narrate(sys.modules)

Of course, spelling-out "iterate" would be just as fine.

Just my 0.02EUR,

Martin