In <[EMAIL PROTECTED]>, mosscliffe wrote: > for x,y in map(None, lista, listb): # Also fine - extends as > expected > print "MAP:", x, "<<x y>>", y > > for x,y in map("N/A", lista, listb): ########## Fails - Can not call a > 'str' > print "MAP:", x, "<<x y>>", y > > def fillwith(fillchars): > return fillchars > > for x,y in map(fillwith("N/A"), lista, listb): ########## Fails also - > Can not call a 'str' > print "MAP:", x, "<<x y>>", y
`map()` expects a function as first argument that will be applied to the elements in the other the arguments which have to be iterable. That you can give `None` as a function and the resulting behavior is IMHO a very ugly thing and has not much to to with the semantics expected from a `map()` function. The `None` is not the default fill value but a placeholder for the identity function. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list