From 8709697292c67254ba836d7e88d1eba08c4a351a Mon Sep 17 00:00:00 2001 From: Jens-Hilmar Bradt <17177271+jenshb@users.noreply.github.com> Date: Wed, 22 Mar 2023 19:43:41 +0100 Subject: [PATCH] [doc] Fix error in tutorial example: type(exc) is the type rather than the instance (#102751) --- Doc/tutorial/errors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index e09c829b8e9..ca5dc3314c6 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