[Doc-SIG] PEP 257

Matt Chaput matt at whoosh.ca
Mon Jan 4 09:48:45 EST 2021


I don't see a contradiction? The note says to use "return" instead of "returns", and the docstring example uses "return".

> On Dec 29, 2020, at 8:58 PM, Paul Graves-DesLauriers <paul at dexmicro.com> wrote:
> 
> I would like clarification about the one-line docstring example.
>  
> The Notes say (fourth bullet):
> The docstring is a phrase ending in a period. It prescribes the function or method's effect as a command ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
>  
> However the docstring example for kos_root() is:  “””Return the pathname of the KOS root directory.”””
>  
> I’ve highlighted the areas that seem to contradict each other.  Perhaps the example should be updated to conform to the notes?



More information about the Doc-SIG mailing list