Opened 10 years ago
Last modified 9 years ago
#6012 enhancement new
Update coding standard docs about docstrings.
Reported by: | Stephen Thorne | Owned by: | Stephen Thorne |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Keywords: | documentation |
Cc: | Branch: |
branches/doc-docstrings-6012
branch-diff, diff-cov, branch-cov, buildbot |
|
Author: | jerub |
Description
Docstrings should be gentle, docstrings should be kind. They should use triple-doublequotes, not triple-singlequotes, and emacs doesn't care about them so much anymore.
Fix up the docs to be clearer about these things
Change History (8)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
Author: | → jerub |
---|---|
Branch: | → branches/doc-docstrings-6012 |
Keywords: | review added |
Status: | new → assigned |
comment:4 Changed 10 years ago by
Owner: | Stephen Thorne deleted |
---|---|
Status: | assigned → new |
comment:5 Changed 10 years ago by
Keywords: | review removed |
---|---|
Owner: | set to Stephen Thorne |
The formatting makes it looks like the unordered list look like it has something to do with the previous paragraph ("Docstrings are never to be used to provide semantic information about an object; this rule may be violated if the code in question is to be used in a system where this is a requirement (such as Zope)."
Perhaps just an additional paragraph that says "Docstring formatting:" or something?
Also, maybe "opening triple-quotes and closing triple-quotes" instead of "opening" and "closing", since it's not very explicit what "opening" and "closing" refer to.
Other than that, looks good to merge!
comment:6 Changed 9 years ago by
comment:7 Changed 9 years ago by
Also mention that docstrings may occasionally be omitted if the method is already documented by a corresponding interface. eg #6459
comment:8 Changed 9 years ago by
Also mention that docstrings may occasionally be omitted if the method is already documented by a corresponding interface. eg #6459
Generally speaking this isn't really true. Or maybe I should say that "occasionally" really means "almost never" here. I agree that #6459 points out a valid problem, but it's very rare that there is *nothing* interesting to say about a particular implementation of an interface. So I'm not sure it's worth encouraging people to skip writing docstrings by pointing this out in the coding standard documentation.
(In [35777]) Make branch for ticket: 'Update coding standard docs about docstrings'
Refs: #6012