From 8bd42869eebdb0e51f450e02bed125ca571893c8 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Sat, 28 Nov 2026 01:45:08 -0600 Subject: [PATCH] Clarify quote escaping in the tutorial Add two short phrases to indicate that the `\` seen in this output is expected. No mention is made of `__repr__` or other features which would be unfamiliar to beginners. --- Doc/tutorial/introduction.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst index 465c32d0b72431c..fa27306d3e60469 100644 --- a/Doc/tutorial/introduction.rst +++ b/Doc/tutorial/introduction.rst @@ -166,6 +166,10 @@ Alternatively, we can use the other type of quotation marks:: '"Yes," they said.' >>> "\"Yes,\" they said." '"Yes," they said.' + +When both types of quotes are used, use the ``\`` escape. The output will +also show a backslash:: + >>> '"Isn\'t," they said.' '"Isn\'t," they said.'