Has anyone tried to build an asynchronous version of @contextmanager? Is
it even possible... given the use of yield?

Thanks to PEP 525 - Asynchronous generators [1], it will be possible in python 3.6. Here's a possible implementation [2].

[1] https://www.python.org/dev/peps/pep-0525/
[2] https://github.com/vxgmichel/aiostream/blob/master/aiostream/context_utils.py

/Vincent
_______________________________________________
Async-sig mailing list
Async-sig@python.org
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to