Skip to content
Sharp

Python Internals · interview question

A teammate submits shaky closures and scope code. Which review comment is the strongest?

Multiple choiceMediumchapter-19-curatedpremiumpython-internalsclosures-and-scope
Choose one answer
Answer and explanation

Correct answer

B. Make the rule clearer and easier to explain. Reason about closures in terms of bound names and runtime state, not vague magic.

Why

The best review comment anchors the change to readability, correctness, and future maintenance. If name binding and outer scope rules feel fuzzy, callback and decorator code becomes harder to debug.

Test yourself on Python Internals

A free test with instant, explained results. No account needed.

Start free test
All Python Internals questions →