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/087748.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) commentsGreg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 27 06:00:44 CET 2009
P.J. Eby wrote:
> In particular, it should explain why these choices are so costly as to 
> justify new syntax and a complex implementation:

If avoiding trampolines was the only reason for
yield-from, that mightn't be enough justification
on its own. But it addresses several other use
cases as well. The justification for yield-from is
the total of all those.

> * decorator clearly identifying intent to create a task vs. no 
> indication of task-ness

Currently the only indication that a function is a
generator rather than an ordinary function is the
presence of a 'yield' buried somewhere in the body.
Some people complained about that back when generators
were being designed, but we seem to have gotten used
to it. I don't anticipate any worse problem here.

-- 
Greg
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