Clarified algorithm for stripping indentation from docstrings.
This commit is contained in:
parent
a944c59f6e
commit
c43fa89298
11
pep-0257.txt
11
pep-0257.txt
|
@ -139,11 +139,12 @@ the rest of the docstring by a blank line. The summary line may be on
|
|||
the same line as the opening quotes or on the next line.
|
||||
|
||||
The entire docstring is indented the same as the quotes at its first
|
||||
line (see example below). Docstring processing tools will strip an
|
||||
amount of indentation from the second and further lines of the
|
||||
docstring equal to the indentation of the first non-blank line after
|
||||
the first line of the docstring. Relative indentation of later lines
|
||||
in the docstring is retained.
|
||||
line (see example below). Docstring processing tools will strip a
|
||||
uniform amount of indentation from the second and further lines of the
|
||||
docstring, equal to the minimum indentation of all non-blank lines
|
||||
after the first line of the docstring. Relative indentation of later
|
||||
lines in the docstring is retained. Any indentation on the first line
|
||||
of the docstring (i.e., before the first newline) is removed.
|
||||
|
||||
Insert a blank line before and after all docstrings (one-line or
|
||||
multi-line) that document a class -- generally speaking, the class's
|
||||
|
|
Loading…
Reference in New Issue