[Python-ideas] Cofunctions PEP - Revision 4
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Aug 12 00:42:33 CEST 2010
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
More information about the Python-ideas
mailing list