Liran Nuna <liran...@gmail.com> added the comment:
I would like to stress this issue happens with iterators as well, and this isn't a unique issue to asyncio only. I would like to propose four new magic methods for context managers to solve this: __pause__, __resume__, __apause__ and __aresume__ which will be called before/after a pause/resume happen before the coroutine/iterator continues. I'm not sure however if this is the correct venue for such discussion. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33918> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com