Skip to content
Sharp

Classes and Objects · interview question

Which naming or modeling choice is strongest for dataclass basics?

Multiple choiceMediumchapter-7-curatedpremiumclasses-and-objectsdataclass-basics
python
from dataclasses import dataclass

@dataclass
class OrderLine:
    sku: str
    quantity: int
Choose one answer
Answer and explanation

Correct answer

C. 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 Classes and Objects

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

Start free test
All Classes and Objects questions →