[Python-checkins] [3.11] Use SyntaxError invalid range in tutorial introduction example (GH-93031) (GH-97666)

iritkatriel webhook-mailer at python.org
Fri Sep 30 05:12:54 EDT 2022


https://github.com/python/cpython/commit/1a620c579db24914fc5368340ad3a4f0353ad319
commit: 1a620c579db24914fc5368340ad3a4f0353ad319
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: iritkatriel <1055913+iritkatriel at users.noreply.github.com>
date: 2022-09-30T10:12:22+01:00
summary:

[3.11] Use SyntaxError invalid range in tutorial introduction example (GH-93031) (GH-97666)

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 at eddiehebert.com>

files:
A Misc/NEWS.d/next/Documentation/2022-05-20-18-42-10.gh-issue-93031.c2RdJe.rst
M Doc/tutorial/introduction.rst

diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst
index 33678f5a64b1..ba0f47705297 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 000000000000..c46b45d2433c
--- /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.



More information about the Python-checkins mailing list