You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example for using asyncio.Timeout, expired is accessed as an attribute, but it should be called as a method.
I.e. the example should read as:
asyncdefmain():
try:
# We do not know the timeout when starting, so we pass ``None``.asyncwithasyncio.timeout(None) ascm:
# We know the timeout now, so we reschedule it.new_deadline=get_running_loop().time() +10cm.reschedule(new_deadline)
awaitlong_running_task()
exceptTimeoutError:
passifcm.expired(): # <---- I CHANGED THIS TO BE A METHOD CALLprint("Looks like we haven't finished on time.")
Activity
gh-101498 : Fix asyncio.Timeout example in docs (#101499)
pythongh-101498 : Fix asyncio.Timeout example in docs (pythonGH-101499)
gh-101498 : Fix asyncio.Timeout example in docs (GH-101499)
Merge branch 'main' into inlinecomp2