Barry:

> Ping's suggested list comprehension abbreviation, i.e.:

>    [x in seq if x] == [x for x in seq if x]

> might help.

Note that the last x shouldn't have to be x.

    [x in seq if f(x)] 

is by far my most common syntax error, and 

    [x for x in seq if f(x)]

is always what I want instead.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to