mirror of https://github.com/python/cpython
bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151)
Automerge-Triggered-By: GH:asvetlov
This commit is contained in:
parent
dc19e86983
commit
4dd82194f4
|
@ -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…
Reference in New Issue