"Paddy" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
|
| Iam wondering why the peculiar behavior of map when the function in
| given as None:

The 'peculiar behavior' is the same as zip (except for padding short 
iterators versus truncating long iterators.  Map was added years before 
zip.  After that, map(None,...) was kept for back compatibility.

In 3.0, the doc for map is
"Return an iterator that applies function to every item of iterable, 
yielding the results. If additional iterable arguments are passed, function 
must take that many arguments and is applied to the items from all 
iterables in parallel. With multiple iterables, the iterator stops when the 
shortest iterable is exhausted."

Using a map defined with None raises
TypeError: 'NoneType' object is not callable

tjr



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to