List comprehensions' ugliness (Was: Re: How to explain exactly what "def" does?)
Gerrit Holl
gerrit at nl.linux.org
Wed Feb 5 11:59:26 EST 2003
More information about the Python-list mailing list
Wed Feb 5 11:59:26 EST 2003
- Previous message (by thread): How to explain exactly what "def" does?
- Next message (by thread): List comprehensions' ugliness (Was: Re: How to explain exactly what "def" does?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greg Ewing (using news.cis.dfn.de) schreef op dinsdag 4 februari om 00:32:39 +0000: > List comps themselves aren't ugly, but abusing them > for things like that certainly is! (And probably > gives them a bad name.) So, when exactly is a list comprehension ugly? I use them a lot in places where I used to use filter. For example: filter(foo, i) --> [i for i in l if foo(i)] Is this abuse? What is the correct use for list comprehensions and what isn't? yours, Gerrit. -- Asperger Syndroom - een persoonlijke benadering: http://people.nl.linux.org/~gerrit/ Het zijn tijden om je zelf met politiek te bemoeien: http://www.sp.nl/
- Previous message (by thread): How to explain exactly what "def" does?
- Next message (by thread): List comprehensions' ugliness (Was: Re: How to explain exactly what "def" does?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list