On 1/23/2014, 4:42 PM, Victor Stinner wrote:
2014/1/23 Yury Selivanov <yselivanov...@gmail.com>:
What would be From(x)? A dummy function just returning x?

def From(x): return x

In production yes, but I would also suggest that in debug mode
it should return a wrapper object, that is checked in your
trampoline.
Which kind of check? Task._step() already implements different kind of checks.

"From" could set an attribute, like '__fromyield__ = True' on
generators and CoroWrapper objects. If the attribute is set,
then that generator was yielded with 'yield From()', if not -
complain. Again, only in debug mode.

Yury

Reply via email to