Clarified algorithm for stripping indentation from docstrings.

This commit is contained in:
David Goodger 2002-11-28 03:59:50 +00:00
parent a944c59f6e
commit c43fa89298
1 changed files with 6 additions and 5 deletions

View File

@ -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 same line as the opening quotes or on the next line.
The entire docstring is indented the same as the quotes at its first The entire docstring is indented the same as the quotes at its first
line (see example below). Docstring processing tools will strip an line (see example below). Docstring processing tools will strip a
amount of indentation from the second and further lines of the uniform amount of indentation from the second and further lines of the
docstring equal to the indentation of the first non-blank line after docstring, equal to the minimum indentation of all non-blank lines
the first line of the docstring. Relative indentation of later lines after the first line of the docstring. Relative indentation of later
in the docstring is retained. 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 Insert a blank line before and after all docstrings (one-line or
multi-line) that document a class -- generally speaking, the class's multi-line) that document a class -- generally speaking, the class's