Skip to content

Commit 52d10f6

Browse files
asvetlovzsiciarz
andauthored
[3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779)
Automerge-Triggered-By: GH:asvetlov (cherry picked from commit 4dd8219) Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net> Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net>
1 parent ce5a646 commit 52d10f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/library/contextlib.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ Functions and classes provided:
130130
either as decorators or with :keyword:`async with` statements::
131131

132132
import time
133+
from contextlib import asynccontextmanager
133134

135+
@asynccontextmanager
134136
async def timeit():
135137
now = time.monotonic()
136138
try:

0 commit comments

Comments
 (0)