Skip to content

Commit 8709697

Browse files
authored
[doc] Fix error in tutorial example: type(exc) is the type rather than the instance (python#102751)
1 parent 9b19d39 commit 8709697

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)