]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Use SyntaxError invalid range in tutorial introduction example (GH-93031)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 30 Sep 2022 09:12:22 +0000 (02:12 -0700)
committerPablo Galindo <pablogsal@gmail.com>
Sat, 22 Oct 2022 19:05:51 +0000 (20:05 +0100)
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.

Co-authored-by: Eddie Hebert <eddie@eddiehebert.com>
Doc/tutorial/introduction.rst
Misc/NEWS.d/next/Documentation/2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst [new file with mode: 0644]

index a64a92f436f8574512a522258a55a76bf6a2ced9..558b1c3eec60eded90db469b15dcf17e184448d1 100644 (file)
@@ -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 (file)
index 0000000..c46b45d
--- /dev/null
@@ -0,0 +1 @@
+Update tutorial introduction output to use 3.10+ SyntaxError invalid range.