[Python-Dev] Re: [PEP 224] Attribute Docstrings
Delaney, Timothy
tdelaney at avaya.com
Tue Aug 29 03:46:46 EDT 2000
> Triple quoted strings work -- that's what I'm constantly using. The
> downside is, that the docstrings either contain spurious white space
> or it messes up the layout of the code (if you start subsequent lines
> in the first column).
This is actually dealt with though. Somewhere in the docs is a statement
along the lines of "the indentation of the second line which is not purely
whitespec sets the amount of whitespace to be removed from each line of the
docstring".
So if you specify a docstring as
"""First line
Second line
Third line
Fourth line"""
then any correct tool should show it as
First line
Second line
Third line
Fourth line
rather than
First line
Second line
Third line
Fourth line
However, I think there should be a standard function which does this for us.
Since we're talking about adding additional docstrings, now would be the
time to put it in as a standard method of every object.
Tim Delaney
Developer, Avaya Australia (Formerly Bell Labs Australia)
More information about the Python-list
mailing list