summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorlightdrk <108566237+lightdrk@users.noreply.github.com>2023-06-28 05:21:38 (GMT)
committerGitHub <noreply@github.com>2023-06-28 05:21:38 (GMT)
commit541a10f9ed193a79aeea5e244bca6f6485d0689f (patch)
tree4ba853e7e349db72f80a6603778ff16c0d0553ab /Doc/library
parent1f74b9e933d546a015e8497e3b8728357196acc8 (diff)
downloadcpython-541a10f9ed193a79aeea5e244bca6f6485d0689f.zip
cpython-541a10f9ed193a79aeea5e244bca6f6485d0689f.tar.gz
cpython-541a10f9ed193a79aeea5e244bca6f6485d0689f.tar.bz2
Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task.rst` (#106136)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/asyncio-task.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 3618bcb..0651ff7 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -654,16 +654,16 @@ Timeouts
If ``long_running_task`` takes more than 10 seconds to complete,
the context manager will cancel the current task and handle
the resulting :exc:`asyncio.CancelledError` internally, transforming it
- into an :exc:`asyncio.TimeoutError` which can be caught and handled.
+ into a :exc:`TimeoutError` which can be caught and handled.
.. note::
The :func:`asyncio.timeout` context manager is what transforms
- the :exc:`asyncio.CancelledError` into an :exc:`asyncio.TimeoutError`,
- which means the :exc:`asyncio.TimeoutError` can only be caught
+ the :exc:`asyncio.CancelledError` into a :exc:`TimeoutError`,
+ which means the :exc:`TimeoutError` can only be caught
*outside* of the context manager.
- Example of catching :exc:`asyncio.TimeoutError`::
+ Example of catching :exc:`TimeoutError`::
async def main():
try: