Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCPP-32-101 All Questions

View all questions & answers for the PCPP-32-101 exam

Exam PCPP-32-101 topic 1 question 18 discussion

Actual exam question from Python Institute's PCPP-32-101
Question #: 18
Topic #: 1
[All PCPP-32-101 Questions]

Select the true statement related to PEP 257.

  • A. String literals that occur immediately after another docstring are called attribute docstrings
  • B. Attribute docstrings and Additional docstrings are two types of extra docstrings that can be extracted by software tools
  • C. String literals that occur in places other than the first statement in a module, function, or class definition can act as documentation. They are recognized by the Python bytecode compiler, and are accessible as runtime object attributes.
  • D. String literals that occur immediately after a simple assignment at the top level of a module are called complementary docstrings
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
rafles
Highly Voted 1 year, 4 months ago
Selected Answer: B
According to PEP 257: String literals occurring elsewhere in Python code may also act as documentation. They are not recognized by the Python bytecode compiler and are not accessible as runtime object attributes (i.e. not assigned to __doc__), but two types of extra docstrings may be extracted by software tools: String literals occurring immediately after a simple assignment at the top level of a module, class, or __init__ method are called “attribute docstrings”. String literals occurring immediately after another docstring are called “additional docstrings”.
upvoted 5 times
...
2211094
Most Recent 1 month ago
B is valid answer
upvoted 1 times
...
w_w_w_w_w_w
1 year, 4 months ago
Selected Answer: B
https://peps.python.org/pep-0257/ String literals occurring elsewhere in Python code may also act as documentation. They are not recognized by the Python bytecode compiler and are not accessible as runtime object attributes (i.e. not assigned to __doc__), but two types of extra docstrings may be extracted by software tools: So, it's B
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...