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

[Python-Dev] PEP 380 (yield from a subgenerator) comments

[Python-Dev] PEP 380 (yield from a subgenerator) comments [Python-Dev] PEP 380 (yield from a subgenerator) commentsP.J. Eby pje at telecommunity.com
Sat Mar 28 14:39:02 CET 2009
At 06:52 AM 3/28/2009 -0500, Guido van Rossum wrote:
> > 2. In addition to the "yield from" syntax for delegating to a
> > subgenerator, also add new syntax for returning values from
> > subgenerators so that the basic "return X" can continue to trigger
> > SyntaxError.
> >
> > Since option 2 would most likely lead to a bikeshed discussion of epic
> > proportions, I'm currently a fan of option 1 ;)
>
>Me too. It also seems option 2 doesn't help us decide what it should
>do: I still think that raising StopIteration(value) would be
>misleading to vanilla users of the generators.

Agreed.  (I still think new syntax is a plus, though, as it helps to 
clearly signal both the intent to make the generator a "subtask" and 
the need to call it with yield-from.  Readability counts.)

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