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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4