mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Changed summary line of docstring to follow PEP 0257
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
|
.. code-block:: python
|
||||||
|
|
||||||
def square(x):
|
def square(x):
|
||||||
"""Squares x.
|
"""Square x.
|
||||||
|
|
||||||
>>> square(2)
|
>>> square(2)
|
||||||
4
|
4
|
||||||
|
|||||||
Reference in New Issue
Block a user