mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
Changed summary line of docstring to follow PEP 0257 - update
Quoting https://www.python.org/dev/peps/pep-0257/#one-line-docstrings "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 ...".
This commit is contained in:
@@ -116,7 +116,7 @@ A simple doctest in a function:
|
||||
.. code-block:: python
|
||||
|
||||
def square(x):
|
||||
"""Square x.
|
||||
"""Return the square of x.
|
||||
|
||||
>>> square(2)
|
||||
4
|
||||
|
||||
Reference in New Issue
Block a user