[Python-Dev] Re: PEP 279 revisited (original) (raw)

Patrick K. O'Brien pobrien@orbtech.com
Wed, 24 Apr 2002 10:34:23 -0500


[Alex Martelli]

What's now named 'enumerate', incidentally, is a type (just like 'tuple', 'dict', 'str' -- all consistently non-verbs, and types rather than functions since a few months), so I'm not quite sure why it should be a verb

I'm partial to enumerate, but agree with Alex that since it returns a type the name is less than satisfying. So I'd like to float the idea of using the Iterator spec as our model for this new type and function.

The new type is a numerator but that is a mouthful so the built-in function should be named numer(), just like iter() is short for iterator. If people can learn and remember iter(), it should be just as easy to learn and remember numer(). They are spelled almost the same, they rhyme, they are short, etc. All the logic that lead to the selection of iter() should apply here.


Patrick K. O'Brien Orbtech