[issue24795] Make event loops with statement context managers

STINNER Victor report at bugs.python.org
Thu Aug 6 01:17:50 CEST 2015


STINNER Victor added the comment:

+1 for me. Asyncio examples already have this try/finally pattern. I
already proposed to support context manager some months ago.

Guido, I don't understand your point. Usually the main function id
loop.run_until_complete/.run_forever. That's all. It doesn't mean that the
loop only runs a few milliseconds.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24795>
_______________________________________


More information about the Python-bugs-list mailing list