Am Montag 22 Mai 2006 02:46 schrieben Sie: > 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 <expr> > > in <expr> if <expr>:" 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.
You can also do the same here (by using normal bracketing): for <expr> in (<some> <non-trivial> <stuff>) if (<one expr> and <two expr> and <three expr>): foo(x) --- Heiko. _______________________________________________ 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