give equivalent code for raise from
This commit is contained in:
parent
d3966c5fcd
commit
43650eddca
|
@ -50,6 +50,12 @@ printed. ``__cause__`` will return to its original purpose and values.
|
|||
There is precedence for ``__suppress_context__`` with the
|
||||
``print_line_and_file`` exception attribute.
|
||||
|
||||
To summarize, ``raise exc from cause`` will be equivalent to::
|
||||
|
||||
exc.__cause__ = cause
|
||||
exc.__suppress_context__ = cause is None
|
||||
raise exc
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
|
|
Loading…
Reference in New Issue