mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779)
Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit 4dd82194f4)
Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net>
Co-authored-by: Zbigniew Siciarz <zbigniew@siciarz.net>
This commit is contained in:
parent
ce5a6460ae
commit
52d10f6485
1 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue