Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 812583ce3b49ec871ded8d281a80ac6809f8df44 1 parent 29078ea
Adrian Holovaty authored July 26, 2007

Showing 1 changed file with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. 16  docs/contributing.txt
16  docs/contributing.txt
@@ -279,6 +279,22 @@ Please follow these coding standards when writing code for inclusion in Django:
279 279
     * Mark all strings for internationalization; see the `i18n documentation`_
280 280
       for details.
281 281
 
  282
+    * In docstrings, use "action words," like so::
  283
+
  284
+          def foo():
  285
+              """
  286
+              Calculates something and returns the result.
  287
+              """
  288
+              pass
  289
+
  290
+      Here's an example of what not to do::
  291
+
  292
+          def foo():
  293
+              """
  294
+              Calculate something and return the result.
  295
+              """
  296
+              pass
  297
+
282 298
     * Please don't put your name in the code you contribute. Our policy is to
283 299
       keep contributors' names in the ``AUTHORS`` file distributed with Django
284 300
       -- not scattered throughout the codebase itself. Feel free to include a

0 notes on commit 812583c

Please sign in to comment.
Something went wrong with that request. Please try again.