A really bad idea.

Alex Martelli aleax at aleax.it
Thu Nov 14 15:39:28 EST 2002


M wrote:
   ...
> But I see a disturbing trend.

"trend"?

> The new enumerate or zip function. If you look at the code using this

"new"?  _zip_...?  It was introduced in Python 2.0...

> function it is not at all obvious what the code does. Let say a programmer

Are you claiming the pre-2.0 code (without zip) doing the rough equivalent 
of today's e.g. 
    x = zip(onething, another) 
namely
    x = map(None, onething, another)
WAS more obvious...?!  I don't see how you can claim a TREND unless you
ARE claiming that "map(None, ..." was indeed "obvious" in a way that
zip isn't.  And that is so totally and utterly absurd a claim that I
wouldn't know what to make of it.

Python has a few dozen built-in functions.  I wouldn't _expect_ MOST of
them to be "immediately obvious" to somebody who has not even bothered
glancing at the docs, or trying e.g help(zip) at the prompt in an
interactive session.  And I don't see any "trend" in that, since e.g.
the time of Python 1.5.2, which is where I came in.


> I hope this is not a start of adding powerfull and hard to understand
> features to Python.

I dispute that "not immediately obvious unless one bothers to read
the docs or try calling help" is equivalent to "hard to understand".
In any case, you cannot possibly be seeing "the start" of adding a
few powerful built-in functions to Python, since most of them were
already in 1.5.2 -- thus, "the start" must have been much older.


Alex




More information about the Python-list mailing list