[Python-ideas] Proto-PEP on a 'yield from' statement

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Feb 13 03:12:37 CET 2009


Bruce Frederiksen wrote:

> I would think that in addition to forwarding send values to the 
> subgenerator, that throw exceptions sent to the delegating generator 
> also be forwarded to the subgenerator.

Urg, I'd forgotten about that feature! You're quite right.

> Also, the subgenerator close method should be called by the 
> delegating generator.

Right again.

I'll add these to the next next revision, thanks.

> I'm also against using return as the syntax for a final value from the 
> subgenerator.

Can you look at what I said in the last revision about
"Generators as Threads" and tell me whether you still
feel that way?

-- 
Greg





More information about the Python-ideas mailing list