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

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Mar 21 23:21:38 CET 2009


P.J. Eby wrote:

> My concern is that allowing 'return value' in generators is going to be 
> confusing, since it effectively causes the return value to "disappear" 
> if you're not using it in this special way with some framework that 
> takes advantage.

But part of all this is that you *don't* need a special
framework to get the return value -- all you need is a
caller that uses a yield-from statement. There are uses
for that besides threading systems.

-- 
Greg


More information about the Python-Dev mailing list