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

Guido van Rossum gvanrossum at gmail.com
Fri Apr 29 00:55:03 CEST 2005

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:

A variation on this with somewhat different semantics swaps the keywords:

    in EXPR for VAR:

If you don't need the variable, you can leave the "for VAR" part out:

    in EXPR:

Too cute? :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list