A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-October/082822.html below:

[Python-Dev] if-syntax for regular for-loops

[Python-Dev] if-syntax for regular for-loopsLeif Walsh leif.walsh at gmail.com
Sat Oct 4 00:24:52 CEST 2008
On Fri, Oct 3, 2008 at 12:33 PM, Andreas Nilsson <adde at trialcode.com> wrote:
> Thanks for the pointer!
> I don't buy the argument that newlines automagically improves readability
> though. You also get increased nesting suggesting something interesting is
> happening where it isn't and that hurts readability.
> And as Vitor said, all other constructions of the form 'for i in items' can
> have if-conditions attached to them, it's really not that far-fetched to
> assume that the loop behaves the same way. Consistency good, surprises bad.

Yeah, I know what you mean, and I kind of liked the idea of adding the
if statement to the for loop (for consistency, if nothing else), but
it's been discussed before, and plenty of people have made the same
argument.  Probably not worth it.

-- 
Cheers,
Leif
More information about the Python-Dev mailing list

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