File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -197,21 +197,19 @@ and workarounds.
197197String literals can span multiple lines. One way is using triple-quotes:
198198``"""...""" `` or ``'''...''' ``. End of lines are automatically
199199included in the string, but it's possible to prevent this by adding a ``\ `` at
200- the end of the line. The following example::
201-
202- print("""\
200+ the end of the line. In the following example, the initial newline is not
201+ included::
202+
203+ >>> print("""\
204+ ... Usage: thingy [OPTIONS]
205+ ... -h Display this usage message
206+ ... -H hostname Hostname to connect to
207+ ... """)
203208 Usage: thingy [OPTIONS]
204209 -h Display this usage message
205210 -H hostname Hostname to connect to
206- """)
207-
208- produces the following output (note that the initial newline is not included):
209211
210- .. code-block :: text
211-
212- Usage: thingy [OPTIONS]
213- -h Display this usage message
214- -H hostname Hostname to connect to
212+ >>>
215213
216214Strings can be concatenated (glued together) with the ``+ `` operator, and
217215repeated with ``* ``::
You can’t perform that action at this time.
0 commit comments