summaryrefslogtreecommitdiffstats
path: root/Doc/library/contextlib.rst
diff options
context:
space:
mode:
authorZbigniew Siciarz <zbigniew@siciarz.net>2021-11-25 12:30:48 (GMT)
committerGitHub <noreply@github.com>2021-11-25 12:30:48 (GMT)
commit4dd82194f4a0e48a94191655e571b3aad1c4a22a (patch)
treee0b6be89f7ae85d0402026c728b94cabdcffc7c0 /Doc/library/contextlib.rst
parentdc19e8698327cae3d6274b73c135375955f1d0d0 (diff)
downloadcpython-4dd82194f4a0e48a94191655e571b3aad1c4a22a.zip
cpython-4dd82194f4a0e48a94191655e571b3aad1c4a22a.tar.gz
cpython-4dd82194f4a0e48a94191655e571b3aad1c4a22a.tar.bz2
bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151)
Automerge-Triggered-By: GH:asvetlov
Diffstat (limited to 'Doc/library/contextlib.rst')
-rw-r--r--Doc/library/contextlib.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index a800a0b..bb93088 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -130,7 +130,9 @@ Functions and classes provided:
either as decorators or with :keyword:`async with` statements::
import time
+ from contextlib import asynccontextmanager
+ @asynccontextmanager
async def timeit():
now = time.monotonic()
try: