Skip to content

Commit f79cfb6

Browse files
[doc] Fix error in tutorial example: type(exc) is the type rather than the instance (GH-102751)
(cherry picked from commit 8709697) Co-authored-by: Jens-Hilmar Bradt <[email protected]>
1 parent a9ece4a commit f79cfb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/tutorial/errors.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ accessing ``.args``. ::
160160
>>> try:
161161
... raise Exception('spam', 'eggs')
162162
... except Exception as inst:
163-
... print(type(inst)) # the exception instance
163+
... print(type(inst)) # the exception type
164164
... print(inst.args) # arguments stored in .args
165165
... print(inst) # __str__ allows args to be printed directly,
166166
... # but may be overridden in exception subclasses

0 commit comments

Comments
 (0)