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/2006-January/059972.html below:

[Python-Dev] yield back-and-forth?

[Python-Dev] yield back-and-forth? [Python-Dev] yield back-and-forth?Andrew Koenig ark at acm.org
Sat Jan 21 06:55:05 CET 2006
> The discussion about PEP 343 reminds me of the following. Bram Cohen
> pointed out in private email that, before PEP 342, there wasn't a big
> need for a shortcut to pass control to a "sub-generator" because the
> following for-loop works well enough:

>  def main_generator():
>       ...
>       for value in sub_generator():
>           yield value

> but now that yield can return a value, that value might have to be
> passed into sub_generator(), not to mention of exceptions. I'm sure
> there's a way to write that (although I haven't found the time to
> figure it out) but I expect it to be cumbersome and subtle.

It looks to me like continuations are starting to rear their heads...




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