File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -20,21 +20,23 @@ This PEP proposes to add a feature that automatically removes indentation from m
2020
2121Dedented multiline strings use a new prefix "d" (shorthand for "dedent") before the opening quote of a multiline string literal.
2222
23+ Example (spaces are visualized as `_ `):
24+
2325.. code-block :: python
2426
2527 def hello_paragraph () -> str :
26- return d"""
27- <p>
28- Hello , World!
29- </p>
30- """
28+ ____return d"""
29+ ________ <p>
30+ __________Hello , World!
31+ ________ </p>
32+ ____ """
3133
3234 The closing triple quotes control how much indentation would be removed.
33- In the above example, the returned string will contain three lines:
35+ In the above example, the returned string will contain three lines
3436
35- * ``" <p>\n" `` (four leading spaces)
36- * ``" Hello , World!\n" `` (six leading spaces)
37- * ``" </p>\n" `` (four leading spaces)
37+ * ``"____ <p>\n" `` (four leading spaces)
38+ * ``"______Hello , World!\n" `` (six leading spaces)
39+ * ``"____ </p>\n" `` (four leading spaces)
3840
3941
4042Motivation
You can’t perform that action at this time.
0 commit comments