8000 Use SyntaxError invalid range in tutorial introduction example by ehebert · Pull Request #93031 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Use SyntaxError invalid range in tutorial introduction example #93031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use SyntaxError invalid range in tutorial introduction example
Use output from a 3.10+ REPL, showing invalid range, for the
SyntaxError examples in the tutorial introduction page.
  • Loading branch information
ehebert committed May 21, 2022
commit eb2322d3aea14ad941ed9f7236fd4a88a91f3ad7
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