Skip to content
Sharp

Advanced Python · interview question

A teammate submits shaky contextlib helpers code. Which review comment is the strongest?

Multiple choiceMediumchapter-14-curatedpremiumadvanced-pythoncontextlib-helpers
Choose one answer
Answer and explanation

Correct answer

B. Make the rule clearer and easier to explain. Use contextlib tools when they make a temporary resource or audit scope easier to express honestly.

Why

The best review comment anchors the change to readability, correctness, and future maintenance. Not every scope needs a full class; over-engineering the mechanism can distract from the real rule.

Test yourself on Advanced Python

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

Start free test
All Advanced Python questions →