mirror of https://github.com/python/cpython
Merge with 3.4
This commit is contained in:
commit
ed49265b91
|
@ -313,14 +313,14 @@ exception, the saved exception is set as the context of the new exception.
|
|||
If the :keyword:`finally` clause executes a :keyword:`return` or :keyword:`break`
|
||||
statement, the saved exception is discarded::
|
||||
|
||||
def f():
|
||||
try:
|
||||
1/0
|
||||
finally:
|
||||
return 42
|
||||
|
||||
>>> f()
|
||||
42
|
||||
>>> def f():
|
||||
... try:
|
||||
... 1/0
|
||||
... finally:
|
||||
... return 42
|
||||
...
|
||||
>>> f()
|
||||
42
|
||||
|
||||
The exception information is not available to the program during execution of
|
||||
the :keyword:`finally` clause.
|
||||
|
|
Loading…
Reference in New Issue