comprehensions was Re: Switch statements again

Dave Brueck dave at pythonapocrypha.com
Thu Jan 16 15:19:30 EST 2003


On Thu, 16 Jan 2003, Andrew Dalke wrote:

> > FWIW, I found simple list comprehensions to be one of the least taxing
> > Pythonisms to get used to - IMO the syntax maps very obviously to the
> > behavior.
>
> It wasn't as obvious to everyone.

Nor would I expect it to be - most likely it has as much to do with
previous experience as anything else (e.g. I have a weak background in
functional languages, so idioms from those languages are less obvious to
me).

I just don't think it is some _big_ stumbling block for _nearly all_
newbies, and I definitely disagree that list comprehensions always (per
the OP) reduce readability, that's all.

Have fun,
-Dave





More information about the Python-list mailing list