summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2017-12-14 01:19:17 (GMT)
committerYury Selivanov <yury@magic.io>2017-12-14 01:19:17 (GMT)
commit176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf (patch)
tree308b48c9671eb33abe108d59b87eaaccad40d9eb /Doc/library
parentbfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1 (diff)
downloadcpython-176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf.zip
cpython-176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf.tar.gz
cpython-176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf.tar.bz2
bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/contextlib.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 48ca0da..faa6c8a 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -29,6 +29,17 @@ Functions and classes provided:
.. versionadded:: 3.6
+.. class:: AbstractAsyncContextManager
+
+ An :term:`abstract base class` for classes that implement
+ :meth:`object.__aenter__` and :meth:`object.__aexit__`. A default
+ implementation for :meth:`object.__aenter__` is provided which returns
+ ``self`` while :meth:`object.__aexit__` is an abstract method which by default
+ returns ``None``. See also the definition of
+ :ref:`async-context-managers`.
+
+ .. versionadded:: 3.7
+
.. decorator:: contextmanager