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/2005-April/053147.html below:

[Python-Dev] PEP 340 - possible new name for block-statement

[Python-Dev] PEP 340 - possible new name for block-statement [Python-Dev] PEP 340 - possible new name for block-statementDavid Ascher david.ascher at gmail.com
Fri Apr 29 18:42:33 CEST 2005
On 4/28/05, Guido van Rossum <gvanrossum at gmail.com> wrote:
> How about, instead of trying to emphasize how different a
> block-statement is from a for-loop, we emphasize their similarity?
> 
> A regular old loop over a sequence or iterable is written as:
> 
>     for VAR in EXPR:
>         BLOCK
> 
> A variation on this with somewhat different semantics swaps the keywords:
> 
>     in EXPR for VAR:
>         BLOCK
> 
> If you don't need the variable, you can leave the "for VAR" part out:
> 
>     in EXPR:
>         BLOCK
> 
> Too cute? :-)

If you want to truly confuse the Ruby folks, you could go for something like:

{ EXPR } VAR:
    BLOCK

<wink/>
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