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/053105.html below:

[Python-Dev] Re: anonymous blocks

[Python-Dev] Re: anonymous blocks [Python-Dev] Re: anonymous blocksNick Coghlan ncoghlan at gmail.com
Thu Apr 28 14:08:08 CEST 2005
Brett C. wrote:
>>I'm surprisingly close to agreeing with you, actually. I've worked out
>>that it isn't the looping that I object to, it's the inability to get
>>out of the loop without exhausting the entire iterator.

> 'break' isn't' enough for you as laid out by the proposal?  The raising of
> StopIteration, which is what 'break' does according to the standard, should be
> enough to stop the loop without exhausting things.  Same way you stop a 'for'
> loop from executing entirely.

The StopIteration exception effectively exhausted the generator, though. 
However, I've figured out how to deal with that, and my reservations about PEP 
340 are basically gone.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net
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