PyDocs

Nav

Python Runtime Services

AsyncExitStack.enter_async_context

contextlib

async method of AsyncExitStack (source)
  • AsyncExitStack.enter_async_context(cm)
Enters the supplied async context manager.

If successful, also pushes its __aexit__ method as a callback and
returns the result of the __aenter__ method.
Changed in 3.11, 3.15
  • 3.11: Raises TypeError instead of AttributeError if cm is not an asynchronous context manager.
  • 3.15: Added support for arbitrary descriptors __aenter__() and __aexit__().
0 Examples
No examples for contextlib/AsyncExitStack.enter_async_context.
See Also
No see-alsos for contextlib/AsyncExitStack.enter_async_context
0 Notes
No notes for AsyncExitStack.enter_async_context