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/2009-January/085194.html below:

Add a "while" clause to generator expressions

[Python-Dev] PEP 3142: Add a "while" clause to generator expressions [Python-Dev] PEP 3142: Add a "while" clause to generator expressionsSturla Molden sturla at molden.no
Mon Jan 19 20:29:31 CET 2009
On 1/19/2009 6:51 PM, Terry Reedy wrote:

> The other, posted by Steven Bethard, is that it fundamentally breaks the 
> current semantics of abbreviating (except for iteration variable 
> scoping) an 'equivalent' for loop. 

The proposed syntax would suggest that this should be legal as well:

for i in iterable while cond:
    blahblah

or perhaps:

while cond for i in iterable:
    blahblah


A while-for or for-while loop would be a novel invention, not seen in 
any other language that I know of. I seriously doubt its usefulness 
though...



Sturla Molden
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