Skip to content
Sharp

Python Internals · interview question

Which naming or modeling choice is strongest for closures and scope?

Multiple choiceMediumchapter-19-curatedpremiumpython-internalsclosures-and-scope
python
def build_multiplier(factor: int):
    def apply(value: int) -> int:
        return value * factor
    return apply
Choose one answer
Answer and explanation

Correct answer

B. Use names and structures that describe the business fact directly instead of temporary implementation noise.

Why

Clear naming and modeling shorten debugging, review, and onboarding time.

Test yourself on Python Internals

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

Start free test
All Python Internals questions →