Guido van Rossum added the comment:

While I understand your problem, I really do not want to enable recursive event 
loops. While they are popular in some event systems (IIRC libevent relies 
heavily on the concept), I have heard some strong objections from other parts, 
and I am trying to keep the basic event loop functionality limited to encourage 
interoperability with other even loop systems (e.g. Tornado, Twisted).

In my own experience, the very programming technique that you are proposing has 
caused some very hard to debug problems that appeared as very infrequent and 
hard to predict stack overflows.

I understand this will make your code slightly less elegant in some cases, but 
I think in the end it is for the best if you are required to define an explicit 
method (declared to be a coroutine) for membership testing of a remote object.  
The explicit "yield from" will help the readers of your code understand that 
global state may change (due to other callbacks running while you are blocked), 
and potentially help a static analyzer find bugs in your code before they take 
down your production systems.

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to