Skip to content

Commit fd7da76

Browse files
miss-islingtonSnoopJnedbat
authored
[3.13] gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643) (#145646)
gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643) --------- (cherry picked from commit 5a15a52) Co-authored-by: James <snoopjedi@gmail.com> Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
1 parent 1a73d5a commit fd7da76

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/tutorial/introduction.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ If you don't want characters prefaced by ``\`` to be interpreted as
184184
special characters, you can use *raw strings* by adding an ``r`` before
185185
the first quote::
186186

187-
>>> print('C:\some\name') # here \n means newline!
188-
C:\some
187+
>>> print('C:\this\name') # here \t means tab, \n means newline
188+
C: his
189189
ame
190-
>>> print(r'C:\some\name') # note the r before the quote
191-
C:\some\name
190+
>>> print(r'C:\this\name') # note the r before the quote
191+
C:\this\name
192192

193193
There is one subtle aspect to raw strings: a raw string may not end in
194194
an odd number of ``\`` characters; see

0 commit comments

Comments
 (0)