Skip to content

Commit 9ba976f

Browse files
committed
errors.rst: avoid talking about tokens in the SyntaxError intro
1 parent 3376144 commit 9ba976f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/tutorial/errors.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ complaint you get while you are still learning Python::
2424
SyntaxError: invalid syntax
2525

2626
The parser repeats the offending line and displays little arrows pointing
27-
at the :term:`token` in the line where the error was detected. The error may be
28-
caused by the absence of a token *before* the indicated token. In the
29-
example, the error is detected at the function :func:`print`, since a colon
30-
(``':'``) is missing before it. File name and line number are printed so you
31-
know where to look in case the input came from a script.
27+
at the place where the error was detected. Note that this is not always the
28+
place that needs to be fixed. In the example, the error is detected at the
29+
function :func:`print`, since a colon (``':'``) is missing just before it.
30+
31+
The file name (``<stdin>`` in our example) and line number are printed so you
32+
know where to look in case the input came from a file.
3233

3334

3435
.. _tut-exceptions:

0 commit comments

Comments
 (0)