meeting docstring standards

Miroslav Suchý msuchy at redhat.com
Wed Oct 16 09:06:02 UTC 2013


On 10/14/2013 06:31 PM, Frankie Onuonga wrote:
> Hi,
>
> Trust all is well.
>
> Kindly confirm if this patch is ok.

Unfortunately it is not ok.

Please see:
http://www.python.org/dev/peps/pep-0257/

Especially:
String literals occurring immediately after a simple assignment at the top level of a module, class, or __init__ method 
are called "attribute docstrings".

Having docstrings in middle of code is nonsense, it is not docstring. There should be just plain comments.
And honestly commenting every import is overkill.

Additionally docstring should be indented to same level as code (line 45 of your patch).


-- 
Miroslav Suchy, RHCE, RHCDS
Red Hat, Software Engineer, #brno, #devexp, #fedora-buildsys


More information about the copr-devel mailing list