PCPP1 Advanced Object Oriented Programming Practice Question
What is the effect of setting __slots__ in a parent class on a child class that does not define its own __slots__?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The child class will have a __dict__ attribute, overriding the parent's optimization.
The child class will receive an instance __dict__ unless it also defines __slots__, effectively defeating the memory optimization of the parent.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The child class will have a __dict__ attribute, overriding the parent's optimization.
Why this is correct
By default, subclasses receive a __dict__.
- ✗
The child class will raise an error at instantiation.
Why it's wrong here
No error occurs; it's a standard behavior.
- ✗
The child class will inherit the memory savings automatically.
Why it's wrong here
The child gets a __dict__ automatically unless it defines its own slots.
- ✗
The child class will be unable to add new attributes.
Why it's wrong here
The child class can add attributes because it has a __dict__.
About these practice questions
This PCPP1 question is part of Courseiva's 209-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Python Institute exam blueprint
This PCPP1 practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCPP1 exam.