Question
What deeper point about Mutable Default Arguments should a senior Python developer mention?
- At senior level, the right answer is that Mutable Default Arguments exists mostly for historical syntax reasons.
- A strong senior answer ties this to function-definition time, object identity, and how hidden shared state corrupts correctness.
- At senior level, Python removes the tradeoffs around Mutable Default Arguments, so design choices barely matter in practice.
- At senior level, any approach to Mutable Default Arguments is equally correct if it passes one small local test.
Hint
Look beyond syntax and explain the runtime, API, or design consequence.
Answer and rationale
Correct answer: B. A strong senior answer ties this to function-definition time, object identity, and how hidden shared state corrupts correctness.
A strong senior answer ties this to function-definition time, object identity, and how hidden shared state corrupts correctness. This is the kind of tradeoff-aware answer senior interviews usually expect.
Track: Python