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
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”.
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
...
Log in to ExamTopics
Sign in:
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.
rafles
Highly Voted 1 year, 4 months ago2211094
Most Recent 1 month agow_w_w_w_w_w
1 year, 4 months ago