Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythoncontextmanagerSingle-choice MCQ

What happens when an exception is raised inside this contextmanager-based block?

from contextlib import contextmanager @contextmanager def cm(): print("enter") try: yield finally: print("exit") with cm(): print("body") raise ValueError("boom")