Added section to docs/contributing.txt about docstring coding style
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
29078eaeca
commit
812583ce3b
|
@ -279,6 +279,22 @@ Please follow these coding standards when writing code for inclusion in Django:
|
||||||
* Mark all strings for internationalization; see the `i18n documentation`_
|
* Mark all strings for internationalization; see the `i18n documentation`_
|
||||||
for details.
|
for details.
|
||||||
|
|
||||||
|
* In docstrings, use "action words," like so::
|
||||||
|
|
||||||
|
def foo():
|
||||||
|
"""
|
||||||
|
Calculates something and returns the result.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
Here's an example of what not to do::
|
||||||
|
|
||||||
|
def foo():
|
||||||
|
"""
|
||||||
|
Calculate something and return the result.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
* Please don't put your name in the code you contribute. Our policy is to
|
* Please don't put your name in the code you contribute. Our policy is to
|
||||||
keep contributors' names in the ``AUTHORS`` file distributed with Django
|
keep contributors' names in the ``AUTHORS`` file distributed with Django
|
||||||
-- not scattered throughout the codebase itself. Feel free to include a
|
-- not scattered throughout the codebase itself. Feel free to include a
|
||||||
|
|
Loading…
Reference in New Issue