Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b086c8af
Commit
b086c8af
authored
Nov 11, 2018
by
Andrés Delfino
Committed by
Miss Islington (bot)
Nov 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33699: Describe try's else clause with the rest of the try clause (GH-7252)
https://bugs.python.org/issue33699
parent
76e8fd7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
Doc/reference/compound_stmts.rst
Doc/reference/compound_stmts.rst
+5
-7
No files found.
Doc/reference/compound_stmts.rst
View file @
b086c8af
...
...
@@ -314,9 +314,11 @@ from a function that handled an exception.
statement: break
statement: continue
The optional :keyword:`else` clause is executed if and when control flows off
the end of the :keyword:`try` clause. [#]_ Exceptions in the :keyword:`else`
clause are not handled by the preceding :keyword:`except` clauses.
The optional :keyword:`else` clause is executed if the control flow leaves the
:keyword:`try` suite, no exception was raised, and no :keyword:`return`,
:keyword:`continue`, or :keyword:`break` statement was executed. Exceptions in
the :keyword:`else` clause are not handled by the preceding :keyword:`except`
clauses.
.. index:: keyword: finally
...
...
@@ -847,10 +849,6 @@ body of a coroutine function.
there is a :keyword:`finally` clause which happens to raise another
exception. That new exception causes the old one to be lost.
.. [#] Currently, control "flows off the end" except in the case of an exception
or the execution of a :keyword:`return`, :keyword:`continue`, or
:keyword:`break` statement.
.. [#] A string literal appearing as the first statement in the function body is
transformed into the function's ``__doc__`` attribute and therefore the
function's :term:`docstring`.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment