mirror of
https://github.com/django/django.git
synced 2025-08-12 12:59:14 +00:00
Fixed #24175 -- Updated docstring convention.
This commit is contained in:
parent
18f3e79b13
commit
63412262e5
@ -40,21 +40,13 @@ Python style
|
|||||||
|
|
||||||
from django.views.generic.base import View
|
from django.views.generic.base import View
|
||||||
|
|
||||||
* In docstrings, use "action words" such as::
|
* In docstrings, follow :pep:`257`. For example::
|
||||||
|
|
||||||
def foo():
|
|
||||||
"""
|
|
||||||
Calculates something and returns the result.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
Here's an example of what not to do::
|
|
||||||
|
|
||||||
def foo():
|
def foo():
|
||||||
"""
|
"""
|
||||||
Calculate something and return the result.
|
Calculate something and return the result.
|
||||||
"""
|
"""
|
||||||
pass
|
...
|
||||||
|
|
||||||
Template style
|
Template style
|
||||||
--------------
|
--------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user