Permalink
Browse files

Clarifying a bit on commented code

  • Loading branch information...
1 parent 3f9300b commit 61e948e8874bd2e11da5b6034ea59d01f9d75cfc guibog committed Apr 27, 2012
Showing with 13 additions and 1 deletion.
  1. +13 −1 docs/writing/documentation.rst
@@ -104,26 +104,38 @@ line. Good editors allow to do this with few keystrokes (ctrl-v on Vim).
def tricky_function():
'''
+ Commented out because its breaks something.
if foo:
do_bar()
'''
return baz
def tricky_function():
+ # Commented out because its breaks something.
#if foo:
#do_bar()
return baz
+
+ def tricky_function():
+ # Commented out because its breaks something.
+ # if foo:
+ # do_bar()
+ return baz
+
**Good**
.. code-block:: python
def tricky_function():
+ # Commented out because its breaks something.
#if foo:
# do_bar()
return baz
-
+Note that comment text is properly written and separated from the hash by a
+space. Commented code is not separated from the hash by an additional space;
+this helps when uncommented the code.
The Basics
::::::::::

0 comments on commit 61e948e

Please sign in to comment.