Question
Which statement about Descriptors is the strongest interview answer?
- Descriptors customize attribute access and are part of the mechanism behind properties, methods, and other Python attribute behaviors.
- Descriptors is mostly a naming style choice and has little effect on runtime behavior or design tradeoffs.
- Descriptors exists mainly to reduce the number of files in a Python project.
- Descriptors matters only for frontend scripting and not for backend or automation code.
Hint
Start with the core rule behind Descriptors.
Answer and rationale
Correct answer: A. Descriptors customize attribute access and are part of the mechanism behind properties, methods, and other Python attribute behaviors.
Descriptors customize attribute access and are part of the mechanism behind properties, methods, and other Python attribute behaviors. This is the base concept interviewers commonly test first.
Track: Python