Skip to content

Commit 3969ef6

Browse files
committed
Updating README with multiline comment help strings
1 parent 3a3e8a1 commit 3969ef6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class MyTap(Tap):
128128

129129
### Help string
130130

131-
Single line comments are automatically parsed into the help string provided when running `python main.py -h`. The type and default values of arguments are also provided in the help string.
131+
Single line and/or multiline comments which appear after the argument are automatically parsed into the help string provided when running `python main.py -h`. The type and default values of arguments are also provided in the help string.
132132

133133
```python
134134
"""main.py"""
@@ -138,6 +138,7 @@ from tap import Tap
138138
class MyTap(Tap):
139139
x: float # What am I?
140140
pi: float = 3.14 # I'm pi!
141+
"""Pi is my favorite number!"""
141142

142143
args = MyTap().parse_args()
143144
```
@@ -150,7 +151,7 @@ usage: demo.py --x X [--pi PI] [-h]
150151
151152
optional arguments:
152153
--x X (float, required) What am I?
153-
--pi PI (float, default=3.14) I'm pi!
154+
--pi PI (float, default=3.14) I'm pi! Pi is my favorite number.
154155
-h, --help show this help message and exit
155156
```
156157

0 commit comments

Comments
 (0)