summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/errors.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-03-18 11:51:02 (GMT)
committerGitHub <noreply@github.com>2025-03-18 11:51:02 (GMT)
commit25ae2045a8a6e36d2cc2f386314ee4fd68ccd379 (patch)
treee25f8631ab30bc57b38bf42ca05c44febf873f41 /Doc/tutorial/errors.rst
parente425b075fe80398845eaccefe28fef0f0dc83f1b (diff)
downloadcpython-25ae2045a8a6e36d2cc2f386314ee4fd68ccd379.zip
cpython-25ae2045a8a6e36d2cc2f386314ee4fd68ccd379.tar.gz
cpython-25ae2045a8a6e36d2cc2f386314ee4fd68ccd379.tar.bz2
[3.13] gh-116666: Add "token" glossary term (GH-130888) (GH-131367)
gh-116666: Add "token" glossary term (GH-130888) Add glossary entry for `token`, and link to it. Avoid talking about tokens in the SyntaxError intro (errors.rst); at this point tokenization is too much of a technical detail. (Even to an advanced reader, the fact that a *single* token is highlighted isn't too relevant. Also, we don't need to guarantee that it's a single token.) (cherry picked from commit 30d52058493e07fd1d3efea960482f4001bd2f86) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Diffstat (limited to 'Doc/tutorial/errors.rst')
-rw-r--r--Doc/tutorial/errors.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index c01cb8c..bfb281c 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -24,11 +24,12 @@ complaint you get while you are still learning Python::
SyntaxError: invalid syntax
The parser repeats the offending line and displays little arrows pointing
-at the token in the line where the error was detected. The error may be
-caused by the absence of a token *before* the indicated token. In the
-example, the error is detected at the function :func:`print`, since a colon
-(``':'``) is missing before it. File name and line number are printed so you
-know where to look in case the input came from a script.
+at the place where the error was detected. Note that this is not always the
+place that needs to be fixed. In the example, the error is detected at the
+function :func:`print`, since a colon (``':'``) is missing just before it.
+
+The file name (``<stdin>`` in our example) and line number are printed so you
+know where to look in case the input came from a file.
.. _tut-exceptions: