2014-02-25 17:31 GMT+01:00 Guido van Rossum <[email protected]>:
>> 2014-02-25 16:47 GMT+01:00 Guido van Rossum <[email protected]>:
>> Before changing the "major" version (0.1) of Trollius, I would like to
>> discuss the "yield From(...)" idea.
>>
>> Do you think that the usage of "From()" must be mandatory in Trollius
>> (maybe with a check in debug mode), or if it can be optional?
>
> I think mandatory,  that way it is easiest to change your mind or port.

I added From() in Trollius and modified all calls to yield to add From().

If yield is used without From(), it only raises an error in debug
mode: when PYTHONASYNCIODEBUG environment variable is set to 1. By
default, From(obj) returns obj and so the usage of From() should have
a very small overhead.

I prefer to only enable expensive checks and debug code in debug mode.

Victor

Reply via email to