From eb2322d3aea14ad941ed9f7236fd4a88a91f3ad7 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Fri, 20 May 2022 18:28:31 -0400 Subject: [PATCH] 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. --- Doc/tutorial/introduction.rst | 4 ++-- .../2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Documentation/2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst index 33678f5a64b1f3..ba0f4770529783 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 "", line 1 prefix 'thon' - ^ + ^^^^^^ SyntaxError: invalid syntax >>> ('un' * 3) 'ium' File "", 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 00000000000000..c46b45d2433cb8 --- /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.