Generators versus Coroutines

Peter Hansen peter at engcorp.com
Tue Aug 17 00:35:15 EDT 2004


Paul Rubin wrote:

> The limitations aren't as bad as they sound.  There are easy
> workarounds most of the time.  I do think using the yield keyword
> to identify generator functions was unfortunate, since it makes
> it harder to get rid of the limitations.

@generator
def func():
     blah blah
     yield blah

??

;-)



More information about the Python-list mailing list