Replies: 2 comments 1 reply
-
Isn't
(or other possible variations) a bit weird? That would go against the intuition that the multiline string contents are what they look in the source text, but without taking into account whitespace indentation. FWIW this rule is shared by many other languages |
Beta Was this translation helpful? Give feedback.
1 reply
-
To prevent unfortunate mix-ups and make parsing and other sorts of automated detection easier. They are, essentially, two completely different types of data, and being able to quickly disambiguate between them is helpful. Same reason we even use triple quotes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I get that the last
"""
must only have whitespace to signal the amount of dedenting that should happen (though this also seems questionable, you could get that signal from just the last line?), but then what's up with the first"""
that must be followed by newline right away, thus eating up more vertical space than seems necesssary?Beta Was this translation helpful? Give feedback.
All reactions