summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-03-22 18:51:48 (GMT)
committerGitHub <noreply@github.com>2023-03-22 18:51:48 (GMT)
commitf79cfb662589a0c1a5fdb35a5ed429c07c93ebd6 (patch)
treeacffa4d258db1d68147e116430a9b8b884de3851
parenta9ece4a8392768b4ab35253101f628ec61956646 (diff)
downloadcpython-f79cfb662589a0c1a5fdb35a5ed429c07c93ebd6.zip
cpython-f79cfb662589a0c1a5fdb35a5ed429c07c93ebd6.tar.gz
cpython-f79cfb662589a0c1a5fdb35a5ed429c07c93ebd6.tar.bz2
[doc] Fix error in tutorial example: type(exc) is the type rather than the instance (GH-102751)
(cherry picked from commit 8709697292c67254ba836d7e88d1eba08c4a351a) Co-authored-by: Jens-Hilmar Bradt <17177271+jenshb@users.noreply.github.com>
-rw-r--r--Doc/tutorial/errors.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index e09c829..ca5dc33 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -160,7 +160,7 @@ accessing ``.args``. ::
>>> try:
... raise Exception('spam', 'eggs')
... except Exception as inst:
- ... print(type(inst)) # the exception instance
+ ... print(type(inst)) # the exception type
... print(inst.args) # arguments stored in .args
... print(inst) # __str__ allows args to be printed directly,
... # but may be overridden in exception subclasses