diff options
author | Eddie Hebert <eddie@eddiehebert.com> | 2022-09-30 08:59:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 08:59:46 (GMT) |
commit | 86a3be207dcf3d8f38ad0a85d9ffe3b05b855e1b (patch) | |
tree | 99a02f011d3558281716753a2088e37d4d394e34 | |
parent | 83a3de4e0632d90e0d1d5a9b8859a94c9ac25f65 (diff) | |
download | cpython-86a3be207dcf3d8f38ad0a85d9ffe3b05b855e1b.zip cpython-86a3be207dcf3d8f38ad0a85d9ffe3b05b855e1b.tar.gz cpython-86a3be207dcf3d8f38ad0a85d9ffe3b05b855e1b.tar.bz2 |
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
-rw-r--r-- | Doc/tutorial/introduction.rst | 4 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Documentation/2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst index 33678f5..ba0f477 100644 --- a/Doc/tutorial/introduction.rst +++ b/Doc/tutorial/introduction.rst @@ -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 ``+``:: diff --git a/Misc/NEWS.d/next/Documentation/2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst b/Misc/NEWS.d/next/Documentation/2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst new file mode 100644 index 0000000..c46b45d --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst @@ -0,0 +1 @@ +Update tutorial introduction output to use 3.10+ SyntaxError invalid range. |