Python Internals · interview question
Which judgment is strongest when choosing a data shape for closures and scope?
Multiple choiceMediumchapter-19-curatedpremiumpython-internalsclosures-and-scope
Answer and explanation
Correct answer
A. Pick the structure that matches the business meaning and the operations you need to perform repeatedly.
Why
The right shape makes the rest of the code simpler. The wrong shape forces awkward fixes everywhere else.
Test yourself on Python Internals
A free test with instant, explained results. No account needed.
More Python Internals questions
- Which naming or modeling choice is strongest for import system and caching?
- What does a strong engineer do when reasoning through runtime patching code?
- A bug appears around reference counting and gc. What is the strongest first debugging move?
- Which explanation would best help the team align on closures and scope?
- When is closures and scope being used in the wrong way?
- What is the healthiest performance judgment around runtime patching?