imperative mood in docstrings

Terry Reedy tjreedy at udel.edu
Sun Feb 9 15:46:05 EST 2014


On 2/9/2014 7:05 AM, bagrat lazaryan wrote:
> pep 257 -- docstring conventions, as well as a myriad of books and other resources, recommend documenting a function's or method's effect as a command ("do this", "return that"), not as a description ("does this", "returns that"). what's the logic behind this recommendation?

The imperative is directed at the Python interpreter. It says what a 
call instructs the interpreter to do.

-- 
Terry Jan Reedy




More information about the Python-list mailing list