Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythonexception chainingSingle-choice MCQ

After running this code, what does `e.__cause__` reference, and how does `raise ... from ...` differ from an implicit chain?

try: try: {}['missing'] except KeyError as k: raise ValueError("bad") from k except ValueError as e: print(type(e.__cause__).__name__) print(e.__suppress_context__)