[issue37398] contextlib.ContextDecorator decorating async functions
Nick Coghlan
report at bugs.python.org
Tue Sep 3 04:29:05 EDT 2019
Nick Coghlan <ncoghlan at gmail.com> added the comment:
The query in #37743 highlights that generator functions and other wrapped iterator factories actually face a similar problem: they need the function body to contain "yield from wrapped(*args, **kwargs)" if the CM is going to be closed after the iterator terminates (or is closed), rather than closing immediately after the iterator is created.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37398>
_______________________________________
More information about the Python-bugs-list
mailing list