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/2006-May/065114.html below:

Unification of for statement and list-comp syntax

[Python-Dev] PEP-xxx: Unification of for statement and list-comp syntax [Python-Dev] PEP-xxx: Unification of for statement and list-comp syntaxJosiah Carlson jcarlson at uci.edu
Mon May 22 21:20:12 CEST 2006
Niko Matsakis <niko at alum.mit.edu> wrote:
> 
> > I saw them. Your brain must be wired very differently
> > to mine, because I find loops with a continue in them
> > harder to follow than ones without -- exactly the
> > opposite of what you seem to prefer.
> 
> Delurking for no particular reason:
> 
> For what it's worth, I also favor the continue syntax Heiko compared  
> his code against.  Without it, you have to scroll to the end of the  
> loop to know whether  there is an else clause; it also allows you to  

One could also consider documenting the fact that there is no else
clause...

    for i in ...:
        if ...: #no else clause
            ...

 - Josiah

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