[Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Mon May 22 02:46:30 CEST 2006
- Previous message: [Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax
- Next message: [Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Heiko Wundram wrote:
2) Just as I've replied to Terry J. Reed, if you find list comprehensions easy to read, you're also bound to be able to understand what "for in if :" does, at least AFAICT.
I tend to write non-trivial LCs on multiple lines, e.g.
l = [foo(x) for x in stuff if something_about(x)]
for the very reason that it makes them easier to read.
-- Greg
- Previous message: [Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax
- Next message: [Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]