Question 378 of 511
Object-Oriented ProgramminghardMultiple ChoiceObjective-mapped

Quick Answer

The answer is that descriptors are not only used for read-only attributes, as the protocol actually supports full read-write-delete control. This is because Python’s descriptor protocol defines how an object manages attribute access through the `__get__`, `__set__`, and `__delete__` methods, meaning a descriptor can handle getting, setting, and deleting an attribute, not just reading it. A non-data descriptor only implements `__get__` and can be shadowed by an instance attribute, while a data descriptor implements both `__get__` and `__set__`, giving it priority over instance dictionaries for full read-write behavior. On the Certified Associate Python Programmer PCAP exam, this question tests your understanding of the descriptor protocol characteristics, often appearing as a trick to see if you confuse descriptors with simple read-only properties. A common trap is assuming that because `@property` is often used for computed attributes, all descriptors are read-only, but the protocol itself is far more flexible. To remember, think “get, set, delete — descriptors do all three, not just read.”

PCAP Object-Oriented Programming Practice Question

This PCAP practice question tests your understanding of object-oriented programming. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which of these is NOT a characteristic of Python's descriptor protocol?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "NOT"

    Why it matters: Negative qualifier — you are looking for the one option that does NOT apply. Most options will be true; only one is false for this scenario.

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

Descriptors are only used for attributes that are read-only

Option B is correct because descriptors are not limited to read-only attributes; they can control get, set, and delete operations. A descriptor that only implements `__get__` is a non-data descriptor, which can be overridden by instance attributes, while a data descriptor implements both `__get__` and `__set__` (and optionally `__delete__`), allowing full read-write control. The statement that descriptors are only for read-only attributes is false, as they are commonly used for computed properties, validation, and lazy evaluation.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A descriptor can be used to create properties with custom behavior

    Why it's wrong here

    That is correct.

  • Descriptors are only used for attributes that are read-only

    Why this is correct

    Descriptors can also handle writes and deletes.

    Clue confirmation

    The clue word "NOT" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Class variables assigned to a descriptor are automatically intercepted

    Why it's wrong here

    Correct: descriptor protocol is triggered on instance attribute access.

  • A descriptor must implement __get__

    Why it's wrong here

    At least __get__ is needed for a non-data descriptor.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Python Institute often tests the misconception that descriptors are only for read-only attributes, but the trap here is that descriptors can be read-write (data descriptors) or read-only (non-data descriptors), and the protocol requires at least `__get__`, not that attributes are immutable.

Detailed technical explanation

How to think about this question

Under the hood, the descriptor protocol is invoked via `object.__getattribute__` and `type.__getattribute__`, which check for a data descriptor (has `__set__`) before instance `__dict__`, and a non-data descriptor (only `__get__`) after instance `__dict__`. A real-world scenario is using `@property` (a data descriptor) to enforce validation on attribute assignment, or using `__slots__` descriptors to reduce memory overhead by preventing dynamic attribute creation.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCAP practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCAP practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCAP question test?

Object-Oriented Programming — This question tests Object-Oriented Programming — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Descriptors are only used for attributes that are read-only — Option B is correct because descriptors are not limited to read-only attributes; they can control get, set, and delete operations. A descriptor that only implements `__get__` is a non-data descriptor, which can be overridden by instance attributes, while a data descriptor implements both `__get__` and `__set__` (and optionally `__delete__`), allowing full read-write control. The statement that descriptors are only for read-only attributes is false, as they are commonly used for computed properties, validation, and lazy evaluation.

What should I do if I get this PCAP question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "NOT". Negative qualifier — you are looking for the one option that does NOT apply. Most options will be true; only one is false for this scenario.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCAP 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 PCAP exam.