[Tutor] Looking for a Pythonic way to pass variable number of lists to zip()

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue Mar 22 20:53:41 CET 2005



> well, I would have said "apply(zip, (l1, l2, l3, ...))" but apply has
> been deprecated in 2.3.

Hi Sean,

Sorry for straying away from the original poster's question, but do you
know why apply() is being deprecated?  This is new to me!  ... ok, I see
some discussion on it:

http://mail.python.org/pipermail/python-bugs-list/2004-October/025450.html


And I now see the reference to it in the "Code Migration and
Modernization" PEP 290:

http://www.python.org/peps/pep-0290.html#replace-apply-with-a-direct-function-call


Wow, this is somewhat of a shock to me, that the syntactic sugar approach
is the preferred approach to "apply" in Python.  Ok, thanks for letting me
know.



More information about the Tutor mailing list