Question
In Python, which comparison about Descriptors is accurate?
- There is no practical difference in behavior, performance, or maintainability when Descriptors is involved.
- A plain attribute is simpler for ordinary state, while a descriptor is stronger when one cross-cutting access rule should apply to many attributes consistently.
- The oldest option related to Descriptors is always the right production choice regardless of workload or context.
- Differences around Descriptors are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: B. A plain attribute is simpler for ordinary state, while a descriptor is stronger when one cross-cutting access rule should apply to many attributes consistently.
A plain attribute is simpler for ordinary state, while a descriptor is stronger when one cross-cutting access rule should apply to many attributes consistently. This is the comparison that usually separates memorization from understanding.
Track: Python