@@ -2,9 +2,9 @@ Writing docstrings
2
2
==================
3
3
4
4
The project takes pride in its documentation for the strategies
5
- and its corresponding bibliography. The docstring is a string
6
- which describes a method, module or class. The docstrings help
7
- the user in understanding the working of the strategy
5
+ and its corresponding bibliography. The docstring is a string
6
+ which describes a method, module or class. The docstrings help
7
+ the user in understanding the working of the strategy
8
8
and the source of the strategy. The docstring must be written in
9
9
the following way, i.e.::
10
10
@@ -13,7 +13,7 @@ the following way, i.e.::
13
13
It can be written over multiple lines.
14
14
15
15
"""
16
-
16
+
17
17
Sections
18
18
--------
19
19
@@ -25,7 +25,7 @@ The Sections of the docstring are:
25
25
26
26
class TitForTat(Player):
27
27
"""
28
- A player starts by cooperating and then mimics the
28
+ A player starts by cooperating and then mimics the
29
29
previous action of the opponent.
30
30
"""
31
31
@@ -35,19 +35,20 @@ The Sections of the docstring are:
35
35
or the paper from which the strategy was taken.
36
36
The section must start with the Names section.
37
37
For E.g.::
38
-
38
+
39
39
class TitForTat(Player):
40
40
"""
41
- A player starts by cooperating and then mimics the
41
+ A player starts by cooperating and then mimics the
42
42
previous action of the opponent.
43
-
43
+
44
44
Names:
45
+
45
46
- Rapoport's strategy: [Axelrod1980]_
46
47
- TitForTat: [Axelrod1980]_
47
48
"""
48
-
49
+
49
50
Here, the info written under the Names section
50
51
tells about the source of the TitforTat strategy.
51
- `[Axelrod1980]_ ` corresponds to the bibliographic item in
52
- `docs/reference/bibliography.rst `. If you are using a source
53
- that is not in the bibliography please add it.
52
+ `[Axelrod1980]_ ` corresponds to the bibliographic item in
53
+ `docs/reference/bibliography.rst `. If you are using a source
54
+ that is not in the bibliography please add it.
0 commit comments