mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
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. Automerge-Triggered-By: GH:iritkatriel
This commit is contained in:
parent
83a3de4e06
commit
86a3be207d
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
>>> prefix 'thon' # can't concatenate a variable and a string literal
|
||||||
File "<stdin>", line 1
|
File "<stdin>", line 1
|
||||||
prefix 'thon'
|
prefix 'thon'
|
||||||
^
|
^^^^^^
|
||||||
SyntaxError: invalid syntax
|
SyntaxError: invalid syntax
|
||||||
>>> ('un' * 3) 'ium'
|
>>> ('un' * 3) 'ium'
|
||||||
File "<stdin>", line 1
|
File "<stdin>", line 1
|
||||||
('un' * 3) 'ium'
|
('un' * 3) 'ium'
|
||||||
^
|
^^^^^
|
||||||
SyntaxError: invalid syntax
|
SyntaxError: invalid syntax
|
||||||
|
|
||||||
If you want to concatenate variables or a variable and a literal, use ``+``::
|
If you want to concatenate variables or a variable and a literal, use ``+``::
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Update tutorial introduction output to use 3.10+ SyntaxError invalid range.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue