Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65777

Re: imperative mood in docstrings

From Terry Reedy <tjreedy@udel.edu>
Subject Re: imperative mood in docstrings
Date 2014-02-09 15:46 -0500
References <DUB129-DS68162B098847A10008EC2B1910@phx.gbl>
Newsgroups comp.lang.python
Message-ID <mailman.6599.1391978797.18130.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: imperative mood in docstrings Terry Reedy <tjreedy@udel.edu> - 2014-02-09 15:46 -0500

csiph-web