
Aug. 11, 2010
7:21 a.m.
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. -- Greg