Skip to content

Commit 8bd4286

Browse files
committed
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.
1 parent 49a344e commit 8bd4286

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎Doc/tutorial/introduction.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ Alternatively, we can use the other type of quotation marks::
166166
'"Yes," they said.'
167167
>>> "\"Yes,\" they said."
168168
'"Yes," they said.'
169+
170+
When both types of quotes are used, use the ``\`` escape. The output will
171+
also show a backslash::
172+
169173
>>> '"Isn\'t," they said.'
170174
'"Isn\'t," they said.'
171175

0 commit comments

Comments
 (0)