From 84f9f6ffa8d5301a2928e5c2491f235e01f590b8 Mon Sep 17 00:00:00 2001 From: Jens-Hilmar Bradt <17177271+jenshb@users.noreply.github.com> Date: Thu, 16 Mar 2023 10:08:38 +0100 Subject: [PATCH] type() doesn't return an instance but a type --- 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 e09c829b8e9721..ca5dc3314c63b6 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