Skip to content

Commit

Permalink
Use SyntaxError invalid range in tutorial introduction example (pytho…
Browse files Browse the repository at this point in the history
…nGH-93031)

Use output from a 3.10+ REPL, showing invalid range, for the
SyntaxError examples in the tutorial introduction page.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit 86a3be2)

Co-authored-by: Eddie Hebert <[email protected]>
  • Loading branch information
ehebert authored and miss-islington committed Sep 30, 2022
1 parent 27891e0 commit 8a9d073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/tutorial/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@ This only works with two literals though, not with variables or expressions::
>>> prefix 'thon' # can't concatenate a variable and a string literal
File "<stdin>", line 1
prefix 'thon'
^
^^^^^^
SyntaxError: invalid syntax
>>> ('un' * 3) 'ium'
File "<stdin>", line 1
('un' * 3) 'ium'
^
^^^^^
SyntaxError: invalid syntax

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

0 comments on commit 8a9d073

Please sign in to comment.