
Aug. 11, 2010
10:42 p.m.
Nick Coghlan wrote:
You want more than the iterator protocol - you want the whole generator API (i.e. send() and throw() as well as __next__()).
I can't see why that should be necessary. A 'yield from' manages to degrade gracefully when given something that only supports next(), and there's no reason a cocall can't do the same. -- Greg