Skip to content
Sharp

Classes and Objects · interview question

What is the clearest sign that code around dataclass basics should be refactored?

Multiple choiceEasychapter-7-curatedpremiumclasses-and-objectsdataclass-basics
Choose one answer
Answer and explanation

Correct answer

B. When the rule is no longer easy to trace, explain, or change without breaking nearby behavior.

Why

A refactor is justified when the code stops communicating its intent. Use dataclasses when the main value is named fields and readable construction without hand-writing repetitive boilerplate.

Test yourself on Classes and Objects

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

Start free test
All Classes and Objects questions →