@@ -114,15 +114,15 @@ and ``'exec'`` forms.
114114 The :func: `expr ` function parses the parameter *source * as if it were an input
115115 to ``compile(source, 'file.py', 'eval') ``. If the parse succeeds, an ST object
116116 is created to hold the internal parse tree representation, otherwise an
117- appropriate exception is thrown .
117+ appropriate exception is raised .
118118
119119
120120.. function :: suite(source)
121121
122122 The :func: `suite ` function parses the parameter *source * as if it were an input
123123 to ``compile(source, 'file.py', 'exec') ``. If the parse succeeds, an ST object
124124 is created to hold the internal parse tree representation, otherwise an
125- appropriate exception is thrown .
125+ appropriate exception is raised .
126126
127127
128128.. function :: sequence2st(sequence)
@@ -132,9 +132,9 @@ and ``'exec'`` forms.
132132 to the Python grammar and all nodes are valid node types in the host version of
133133 Python, an ST object is created from the internal representation and returned
134134 to the called. If there is a problem creating the internal representation, or
135- if the tree cannot be validated, a :exc: `ParserError ` exception is thrown . An
135+ if the tree cannot be validated, a :exc: `ParserError ` exception is raised . An
136136 ST object created this way should not be assumed to compile correctly; normal
137- exceptions thrown by compilation may still be initiated when the ST object is
137+ exceptions raised by compilation may still be initiated when the ST object is
138138 passed to :func: `compilest `. This may indicate problems not related to syntax
139139 (such as a :exc: `MemoryError ` exception), but may also be due to constructs such
140140 as the result of parsing ``del f(0) ``, which escapes the Python parser but is
@@ -259,16 +259,16 @@ function for information about the exceptions it can raise.
259259.. exception :: ParserError
260260
261261 Exception raised when a failure occurs within the parser module. This is
262- generally produced for validation failures rather than the built in
263- :exc: `SyntaxError ` thrown during normal parsing. The exception argument is
262+ generally produced for validation failures rather than the built- in
263+ :exc: `SyntaxError ` raised during normal parsing. The exception argument is
264264 either a string describing the reason of the failure or a tuple containing a
265265 sequence causing the failure from a parse tree passed to :func: `sequence2st `
266266 and an explanatory string. Calls to :func: `sequence2st ` need to be able to
267267 handle either type of exception, while calls to other functions in the module
268268 will only need to be aware of the simple string values.
269269
270270Note that the functions :func: `compilest `, :func: `expr `, and :func: `suite ` may
271- throw exceptions which are normally thrown by the parsing and compilation
271+ raise exceptions which are normally thrown by the parsing and compilation
272272process. These include the built in exceptions :exc: `MemoryError `,
273273:exc: `OverflowError `, :exc: `SyntaxError `, and :exc: `SystemError `. In these
274274cases, these exceptions carry all the meaning normally associated with them.
0 commit comments