diff options
author | Jens-Hilmar Bradt <17177271+jenshb@users.noreply.github.com> | 2023-03-22 18:43:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 18:43:41 (GMT) |
commit | 8709697292c67254ba836d7e88d1eba08c4a351a (patch) | |
tree | d037de510eff5c2f6409fee97b5b79f6d8c4b9b1 /Doc | |
parent | 9b19d3936d7cabef67698636d2faf6fa23a95059 (diff) | |
download | cpython-8709697292c67254ba836d7e88d1eba08c4a351a.zip cpython-8709697292c67254ba836d7e88d1eba08c4a351a.tar.gz cpython-8709697292c67254ba836d7e88d1eba08c4a351a.tar.bz2 |
[doc] Fix error in tutorial example: type(exc) is the type rather than the instance (#102751)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/tutorial/errors.rst | 2 |
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 |