@@ -76,23 +76,20 @@ Now consider the case of an expression that doesn't make mathematical sense:
7676 ^
7777 SyntaxError: invalid syntax
7878
79- This creates a syntax error, signified by a :obj: `SyntaxError `
80- exception. In programming languages, as with human languages, the
81- syntax is the set of rules which defines which expressions are
82- well-formed. Notice that the earlier lines of a syntax error appear
83- somewhat different to those of the previous exception. Almost all
84- exceptions occur because the :term: `Python interpreter ` attempts to evaluate a
85- statement or expression and encounters a problem. Syntax errors are a
86- special case: when a syntax error occurs, the interpreter can't even
87- get as far as attempting to evaluate because the sequence of
88- characters it has been asked to execute do not make sense in
89- Python. This does, however, have one advantage, which is that the
90- error message shows the precise point in the line at which the Python
91- interpreter found a problem. This is indicated by the caret symbol
92- (`^ `). In this case, the reason that the expression doesn't make any
93- sense is that the modulo operator (`% `) is not a permissible second
94- operand to multiplication (`* `), so the Python interpreter places the
95- caret under the modulo operator.
79+ This creates a syntax error, signified by a :obj: `SyntaxError ` exception. In
80+ programming languages, as with human languages, the syntax is the set of rules
81+ which defines which expressions are well-formed. Notice that the earlier lines
82+ of a syntax error appear somewhat different to those of the previous exception.
83+ Almost all exceptions occur because the :term: `Python interpreter ` attempts to
84+ evaluate a statement or expression and encounters a problem. Syntax errors are
85+ a special case: when a syntax error occurs, the interpreter can't even get as
86+ far as attempting to evaluate because the sequence of characters it has been
87+ asked to execute do not make sense in Python. This time, the error message
88+ shows the precise point in the line at which the Python interpreter found a
89+ problem. This is indicated by the caret symbol (`^ `). In this case, the reason
90+ that the expression doesn't make any sense is that the modulo operator (`% `) is
91+ not a permissible second operand to multiplication (`* `), so the Python
92+ interpreter places the caret under the modulo operator.
9693
9794Even though the Python interpreter will highlight the point at which
9895the syntax doesn't make sense, this might not quite actually be the
0 commit comments