reduce() anomaly?
Jeremy Fincher
tweedgeezer at hotmail.com
Thu Nov 6 16:25:55 EST 2003
Duncan Booth <duncan at NOSPAMrcp.co.uk> wrote in message news:<Xns942B93E4AE037duncanrcpcouk at 127.0.0.1>...
> which can be written more concisely without the lambda:
>
> d = {}
> map(d.update, l)
Although he shouldn't be using map at all for this case; he's not
using the resulting list.
Just a plan for loop will suffice:
for otherDict in l:
d.update(otherDict)
Jeremy
More information about the Python-list
mailing list