Vitor Bosshard wrote:

On Fri, Oct 3, 2008 at 6:10 AM, Andreas Nilsson wrote:
Essentially, all that saves is a newline
or two, which, as I think has been generally accepted, tends to hurt
readability.

The exact same argument could be used for list comprehensions themselves.

No, an LC saves more than newlines -- it saves the code
to set up and append to a list. This is a substantial
improvement when this code would otherwise swamp the
essentials of what's being done.

This doesn't apply to a plain for-loop that's not
building a list.

--
Greg
_______________________________________________
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