[Python-ideas] Cofunctions: It's alive! Its alive!
greg.ewing at canterbury.ac.nz
Wed Aug 11 07:21:47 CEST 2010
Ron Adam wrote:
> Could using conext() and cosend() methods instead of next() and send()
> give the better error messages and distinguish cofunctions from
> generators without the need for __cocall__ ?
I don't think it would help much. If you forget to use yield-from
in a call that doesn't use the return value, the returned
generator just gets thrown away without anything trying to
call any of its methods.
More information about the Python-ideas