[Python-Dev] PEP 201 - Parallel iteration

Paul Prescod paul@prescod.net
Wed, 19 Jul 2000 11:09:45 -0500

"Barry A. Warsaw" wrote:
> The second possibility is that user code must `appear' to special case
> the situation when the number of sequences is exactly 1.  I.e.
>     >>> for (i,) in zip((1, 2, 3)):
> instead of the more natural (because it's less to type and because of
> the map() heritage):
>     >>> for i in zip((1, 2, 3)):

Why are you using zip in this case? If you *know* that you are going to
get back 1-tuples then you must know that the input is a single list
(i.e. you aren't using "apply"). So why are you using zip at all?

 Paul Prescod - Not encumbered by corporate consensus
Just how compassionate can a Republican get before he has to leave the 
GOP and join Vegans for Global Justice? ... One moment, George W. Bush
is holding a get-to-know-you meeting with a bunch of gay Republicans.
The next he is holding forth on education or the environment ... It is
enough to make a red-blooded conservative choke on his spotted-owl
drumstick.     - April 29th, Economist