Skip to content
Sharp

Classes and Objects · interview question

A teammate submits shaky dataclass basics code. Which review comment is the strongest?

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

Correct answer

C. Make the rule clearer and easier to explain. Use dataclasses when the main value is named fields and readable construction without hand-writing repetitive boilerplate.

Why

The best review comment anchors the change to readability, correctness, and future maintenance. Avoiding dataclasses out of habit can leave beginner Python modeling more verbose than necessary.

Test yourself on Classes and Objects

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

Start free test
All Classes and Objects questions →