[issue2186] map and filter shouldn't support None as first argument (in Py3k only)

Raymond Hettinger report at bugs.python.org
Mon Feb 25 23:08:25 CET 2008


Raymond Hettinger added the comment:

FWIW, I didn't disagree on filter().  Am taking your suggestion under
advisement for a couple days.  At this point, I'm leaning towards
accepting the request (although with a different version of the patch).

For map(None, ...), I happy to live with examples like the patch you
referenced. It's important that this API be as simple and clean as
possible.  It's a matter of taste.  I concur with Guido that we never
would have created map(None, ...) if zip() had existed.  The primary use
case is obsolete.  

Also, I think the motivation behind your other use case will likey be
addressed in a more general way with an identify function being added to
the operator module.  That is a more explicit and less hackish than
having a special meaning for None.  It is also more in-line with the way
functional language approach the same problem.

Will meditate on both of these for a couple days and get back.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2186>
__________________________________


More information about the Python-bugs-list mailing list