Lines Matching refs:clause
20 single: clause
23 Compound statements consist of one or more 'clauses.' A clause consists of a
24 header and a 'suite.' The clause headers of a particular compound statement are
25 all at the same indentation level. Each clause header begins with a uniquely
27 controlled by a clause. A suite can be one or more semicolon-separated simple
31 mostly because it wouldn't be clear to which :keyword:`if` clause a following
32 :keyword:`else` clause would belong: ::
68 The formatting of the grammar rules in the following sections places each clause
95 false, the suite of the :keyword:`else` clause, if present, is executed.
117 suite of the :keyword:`else` clause, if present, is executed and the loop
125 without executing the :keyword:`else` clause's suite. A :keyword:`continue`
156 the :keyword:`else` clause, if present, is executed, and the loop terminates.
163 without executing the :keyword:`else` clause's suite. A :keyword:`continue`
165 with the next item, or with the :keyword:`else` clause if there was no next
232 The :keyword:`except` clause(s) specify one or more exception handlers. When no
233 exception occurs in the :keyword:`try` clause, no exception handler is executed.
236 is found that matches the exception. An expression-less except clause, if
237 present, must be last; it matches any exception. For an except clause with an
238 expression, that expression is evaluated, and the clause matches the exception
243 If no except clause matches the exception, the search for an exception handler
246 If the evaluation of an expression in the header of an except clause raises an
251 When a matching except clause is found, the exception is assigned to the target
252 specified in that except clause, if present, and the except clause's suite is
256 exception, and the exception occurs in the try clause of the inner handler, the
266 Before an except clause's suite is executed, details about the exception are
284 The optional :keyword:`else` clause is executed if and when control flows off
285 the end of the :keyword:`try` clause. [#]_ Exceptions in the :keyword:`else`
286 clause are not handled by the preceding :keyword:`except` clauses.
291 :keyword:`try` clause is executed, including any :keyword:`except` and
293 not handled, the exception is temporarily saved. The :keyword:`finally` clause
295 :keyword:`finally` clause. If the :keyword:`finally` clause raises another
309 the :keyword:`finally` clause.
318 statement, the :keyword:`finally` clause is also executed 'on the way out.' A
319 :keyword:`continue` statement is illegal in the :keyword:`finally` clause. (The
324 statement executed. Since the :keyword:`finally` clause always executes, a
325 :keyword:`return` statement executed in the :keyword:`finally` clause will
596 there is a :keyword:`finally` clause which happens to raise another