PyDocs

Nav

Python Runtime Services

AsyncContextDecorator

contextlib

class · Added in 3.10 (source)
A base class or mixin that enables async context managers to work as decorators.
Changed in 3.15
  • 3.15: Decorating an asynchronous generator function now keeps the context manager open across iteration. Previously the context manager exited as soon as the generator object was created. Synchronous functions and synchronous generator functions are also now accepted, with an asynchronous wrapper returned.
0 Examples
No examples for contextlib/AsyncContextDecorator.
See Also
No see-alsos for contextlib/AsyncContextDecorator
0 Notes
No notes for AsyncContextDecorator