reduce() anomaly?

Duncan Booth duncan at
Thu Nov 6 15:43:49 CET 2003

"David C. Fox" <davidcfox at> wrote in 
news:bjbqb.81856$mZ5.559701 at attbi_s54:

> and
>      d = {}
>      map(lambda x: d.update(x), l)

which can be written more concisely without the lambda:

  d = {}
  map(d.update, l)

Duncan Booth                                             duncan at
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?

More information about the Python-list mailing list