File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ The built-in exceptions listed below can be generated by the interpreter or
2020built-in functions. Except where mentioned, they have an "associated value"
2121indicating the detailed cause of the error. This may be a string or a tuple
2222containing several items of information (e.g., an error code and a string
23- explaining the code). The associated value is the second argument to the
24- :keyword: ` raise ` statement . If the exception class is derived from the standard
25- root class :exc: `BaseException `, the associated value is present as the
26- exception instance's :attr: `args ` attribute.
23+ explaining the code). The associated value is usually passed to the exception
24+ class's constructor . If the exception class is derived from the standard root
25+ class :exc: `BaseException `, the associated value is present as the exception
26+ instance's :attr: `args ` attribute.
2727
2828User code can raise built-in exceptions. This can be used to test an exception
2929handler or to report an error condition "just like" the situation in which the
You can’t perform that action at this time.
0 commit comments