Skip to content

Commit 61e948e

Browse files
author
guibog
committed
Clarifying a bit on commented code
1 parent 3f9300b commit 61e948e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/writing/documentation.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,26 +104,38 @@ line. Good editors allow to do this with few keystrokes (ctrl-v on Vim).
104104
105105
def tricky_function():
106106
'''
107+
Commented out because its breaks something.
107108
if foo:
108109
do_bar()
109110
'''
110111
return baz
111112
112113
def tricky_function():
114+
# Commented out because its breaks something.
113115
#if foo:
114116
#do_bar()
115117
return baz
116118
119+
120+
def tricky_function():
121+
# Commented out because its breaks something.
122+
# if foo:
123+
# do_bar()
124+
return baz
125+
117126
**Good**
118127

119128
.. code-block:: python
120129
121130
def tricky_function():
131+
# Commented out because its breaks something.
122132
#if foo:
123133
# do_bar()
124134
return baz
125135
126-
136+
Note that comment text is properly written and separated from the hash by a
137+
space. Commented code is not separated from the hash by an additional space;
138+
this helps when uncommented the code.
127139

128140
The Basics
129141
::::::::::

0 commit comments

Comments
 (0)