From eba2eac2ea772df66b7608ebcf4ef9ca1148ce78 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 24 Oct 2014 09:31:53 -0700 Subject: [PATCH] Do not recommend a blank line before any docstrings. Patch by Akira Kidata. --- pep-0257.txt | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pep-0257.txt b/pep-0257.txt index 346a22542..0dd649da9 100644 --- a/pep-0257.txt +++ b/pep-0257.txt @@ -140,16 +140,10 @@ 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). -Insert a blank line before and after all docstrings (one-line or -multi-line) that document a class -- generally speaking, the class's -methods are separated from each other by a single blank line, and the -docstring needs to be offset from the first method by a blank line; -for symmetry, put a blank line between the class header and the -docstring. Docstrings documenting functions or methods generally -don't have this requirement, unless the function or method's body is -written as a number of blank-line separated sections -- in this case, -treat the docstring as another section, and precede it with a blank -line. +Insert a blank line after all docstrings (one-line or multi-line) that +document a class -- generally speaking, the class's methods are +separated from each other by a single blank line, and the docstring +needs to be offset from the first method by a blank line. The docstring of a script (a stand-alone program) should be usable as its "usage" message, printed when the script is invoked with incorrect