| |
comp.lang.python |
In <1180173252.906992.262...@q75g2000hsh.googlegroups.com>, mosscliffe > for x,y in map("N/A", lista, listb): ########## Fails - Can not call a > def fillwith(fillchars): > for x,y in map(fillwith("N/A"), lista, listb): ########## Fails also - Ciao,
wrote:
> expected
> print "MAP:", x, "<<x y>>", y
> 'str'
> print "MAP:", x, "<<x y>>", y
> return fillchars
> Can not call a 'str'
> print "MAP:", x, "<<x y>>", y
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.
Marc 'BlackJack' Rintsch