expression form of one-to-many dict?

Steven Bethard steven.bethard at
Sat Dec 18 01:32:11 CET 2004

Fernando Perez wrote:
> outlist = map(foo,inlist)
> is still better in my book, and far more readable, than
> outlist = [foo(x) for x in inlist]
> The map form, in this case, parses instantly in my brain, while the listcomp
> certainly takes a few cycles.  And note that I'm not talking about the typing
> conciseness, but about the effort for my brain.  But maybe I'm just wired
> funny :)

Well, different at least.  I find the map one harder to parse mentally. 
  And not for lack of experience with functional programming.  But to 
each their own. =)


More information about the Python-list mailing list