map vs. list-comprehension

Terry Reedy tjreedy at
Wed Jun 29 21:54:03 CEST 2005

"F. Petitjean" <littlejohn.75 at> wrote in message 
news:42c27238$0$26269$626a14ce at
>res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ]

> Hoping that zip will not be deprecated.

Cease worrying.  Zip was added to replace the zipping behavior of map and 
the idiom map(None, a, b, ...).  It simultaneously altered the behavior for 
unequal length inputs to stop with the shortest instead of padding to the 


More information about the Python-list mailing list