permuting several lists (was Re: [Python-Dev] zip() and list-comprehension with commas)

Jack Jansen jack@oratrix.nl
Wed, 12 Jul 2000 11:44:46 +0200


parallel()/zip() have an other advantage: it would be easy to extend to let 
the loop continue until the longest of the items, with a keyword argument:
  parallel((1, 2), (3, 4, 5), missing=None) # or extend, or some other name
would return
  ((1, 3), (2, 4), (None, 5))

By the way: -1 on the name zip() and -0 on the name parallel(), but +1 on the 
concept.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm