Coroutines and argument tupling

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at
Wed Aug 15 22:30:50 CEST 2007

Marshall T. Vandegrift wrote:
> I'm trying to write a decorator which allows one to produce simple
> coroutines by just writing a function as a generator expression
> which re-receives it's arguments as a tuple from each yield.  

May I ask why? Passing it the same arguments over and over is no
use; and there is the send method.

> The ugliness of the ArgPacker class makes me suspect that I should
> perhaps just manually create and track a generator when I need a
> function with generator-like properties.

What do you mean? I don't quite understand why you'd have to "track"
a generator for getting generator-like properties.



BOFH excuse #103:

operators on strike due to broken coffee machine

More information about the Python-list mailing list