Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ get_cause
Function
get_cause
example_code/item_088.py:223–229 ·
view source on GitHub ↗
(exc)
Source
from the content-addressed store, hash-verified
221
222
print(
"Example 18"
)
223
def
get_cause(exc):
224
if
exc.__cause__ is not None:
225
return
exc.__cause__
226
elif
not exc.__suppress_context__:
227
return
exc.__context__
228
else
:
229
return
None
230
231
232
print(
"Example 19"
)
Callers
1
item_088.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected