gh-55688: Add note about ending backslashes for raw strings (#94768)

Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
This commit is contained in:
Stanley 2022-12-27 21:30:42 -08:00 committed by GitHub
parent 5369bba8c5
commit b95b1b3b25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View file

@ -189,6 +189,11 @@ the first quote::
>>> print(r'C:\some\name') # note the r before the quote
C:\some\name
There is one subtle aspect to raw strings: a raw string may not end in
an odd number of ``\`` characters; see
:ref:`the FAQ entry <faq-programming-raw-string-backslash>` for more information
and workarounds.
String literals can span multiple lines. One way is using triple-quotes:
``"""..."""`` or ``'''...'''``. End of lines are automatically
included in the string, but it's possible to prevent this by adding a ``\`` at