Securing a future for anonymous functions in Python
Donn Cave
donn at u.washington.edu
Wed Jan 12 14:51:32 EST 2005
In article <tyf8y6z59ub.fsf at pcepsft001.cern.ch>,
Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
> Donn Cave <donn at u.washington.edu> writes:
>
> > List incomprehensions do not parse well in my eyes.
>
> Are you familiar with the Haskell syntax for list comprehensions?
>
> For example:
>
> http://www.zvon.org/other/haskell/Outputsyntax/listQcomprehension_reference.h
I haven't used it more than once or twice in the modest
amount of Haskell code I've written, but I've seen it
a few times.
> Does their striking similarity to mathematical set notation help at
> all ?
Not a bit.
If it's any more obvious than the Python version, I suppose
it's the | -- my parser sees [a|b] on the first pass.
But it isn't like I ever made any real effort to get comfortable
with Python list comprehensions. I was just relaying my (lack of)
intuitive grasp of them, compared to map and lambda.
Donn Cave, donn at u.washington.edu
More information about the Python-list
mailing list