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/2014-November/136989.html below:

[Python-Dev] PEP 479: Change StopIteration handling inside generators

[Python-Dev] PEP 479: Change StopIteration handling inside generators [Python-Dev] PEP 479: Change StopIteration handling inside generatorsBenjamin Peterson benjamin at python.org
Wed Nov 19 21:15:27 CET 2014
On Wed, Nov 19, 2014, at 15:10, Guido van Rossum wrote:
> There's a new PEP proposing to change how to treat StopIteration bubbling
> up out of a generator frame (not caused by a return from the frame). The
> proposal is to replace such a StopIteration with a RuntimeError (chained
> to
> the original StopIteration), so that only *returning* from a generator
> (or
> falling off the end) causes the iteration to terminate.
> 
> The proposal unifies the behavior of list comprehensions and generator
> expressions along the lines I had originally in mind when they were
> introduced. It renders useless/illegal certain hacks that have crept into
> some folks' arsenal of obfuscated Python tools.
> 
> In Python 3.5 the proposed change is conditional on:
> 
>     from __future__ import replace_stopiteration_in_generators

Drive-by comment: This seems like a terribly awkward name. Could a
shorter and sweeter name not be found?
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