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/087746.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:18 CET 2009
Guido van Rossum wrote:

> (Well here is Greg's requested use case for .send(). :-)

There was a complaint that my return-value-with-send
example was too much of a coroutine scenario, so I
was hoping to find something un-coroutine-like. But
if coroutines are the main uses for send in the first
place, then it seems my example is fine as it is.

BTW, I've thought of an answer as to why one would
want to write a parser using send(). In the non-send()
version I had to make the scanner a global variable
in order to avoid passing it around among all the
parsing functions. The send() technique avoids having
to do either of those things.

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