diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 4c6c5207131..aa848df8c42 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -463,7 +463,7 @@ Functions and classes provided: The :meth:`close` method is not implemented, :meth:`aclose` must be used instead. - .. method:: enter_async_context(cm) + .. coroutinemethod:: enter_async_context(cm) Similar to :meth:`enter_context` but expects an asynchronous context manager. @@ -477,7 +477,7 @@ Functions and classes provided: Similar to :meth:`callback` but expects a coroutine function. - .. method:: aclose() + .. coroutinemethod:: aclose() Similar to :meth:`close` but properly handles awaitables.