Skip to content

Commit 1a620c5

Browse files
[3.11] Use SyntaxError invalid range in tutorial introduction example (GH-93031) (GH-97666)
Use SyntaxError invalid range in tutorial introduction example (GH-93031) Use output from a 3.10+ REPL, showing invalid range, for the SyntaxError examples in the tutorial introduction page. Co-authored-by: Eddie Hebert <[email protected]>
1 parent 27891e0 commit 1a620c5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Doc/tutorial/introduction.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ This only works with two literals though, not with variables or expressions::
234234
>>> prefix 'thon' # can't concatenate a variable and a string literal
235235
File "<stdin>", line 1
236236
prefix 'thon'
237-
^
237+
^^^^^^
238238
SyntaxError: invalid syntax
239239
>>> ('un' * 3) 'ium'
240240
File "<stdin>", line 1
241241
('un' * 3) 'ium'
242-
^
242+
^^^^^
243243
SyntaxError: invalid syntax
244244

245245
If you want to concatenate variables or a variable and a literal, use ``+``::
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update tutorial introduction output to use 3.10+ SyntaxError invalid range.

0 commit comments

Comments
 (0)