Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythoncustom context managersSingle-choice MCQ

Why does this @contextmanager raise a RuntimeError at runtime?

from contextlib import contextmanager @contextmanager def cm(): yield 1 yield 2 with cm(): pass