This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points))
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mohammad Dehghan, matrixise
Priority: normal Keywords: patch

Created on 2019-09-12 08:13 by Mohammad Dehghan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 16016 merged python-dev, 2019-09-12 08:57
PR 16415 merged miss-islington, 2019-09-26 09:09
PR 16416 merged miss-islington, 2019-09-26 09:09
Messages (7)
msg352057 - (view) Author: Mohammad Dehghan (Mohammad Dehghan) * Date: 2019-09-12 08:27
In section 8.6 of the tutorials page (https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions), the first item of the bullet points explaining some situations about finally clause, states that

> If an exception occurs during execution of the try clause, the exception may be handled by an except clause. **In all cases, the exception is re-raised after the finally clause has been executed.**

This is wrong, since the exception is not re-raised if an `except` clause handles the exception.
msg352060 - (view) Author: Mohammad Dehghan (Mohammad Dehghan) * Date: 2019-09-12 08:58
I submitted a PR for this:
https://github.com/python/cpython/pull/16016
msg352070 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-09-12 09:27
Hi Mohammad,

Could you sign the CLA?

Thank you
msg353278 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-09-26 09:09
New changeset 1ad7be2f16cc9955f271f57a5089602bb41eee85 by Stéphane Wirtel (Mohammad Dehghan) in branch 'master':
bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016)
https://github.com/python/cpython/commit/1ad7be2f16cc9955f271f57a5089602bb41eee85
msg353281 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-09-26 09:15
New changeset 5017a645b0be53c4f399ae39ac897539e8416ca6 by Stéphane Wirtel (Miss Islington (bot)) in branch '3.7':
bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH-16416)
https://github.com/python/cpython/commit/5017a645b0be53c4f399ae39ac897539e8416ca6
msg353282 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-09-26 09:16
New changeset 68040edb79895c577e2526ad5f30b1b161b2c32b by Stéphane Wirtel (Miss Islington (bot)) in branch '3.8':
bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016) (GH-16415)
https://github.com/python/cpython/commit/68040edb79895c577e2526ad5f30b1b161b2c32b
msg353283 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-09-26 09:17
Thank you for your contribution, I close it.
History
Date User Action Args
2022-04-11 14:59:20adminsetgithub: 82311
2019-09-26 09:17:13matrixisesetstatus: open -> closed
resolution: fixed
messages: + msg353283

stage: patch review -> resolved
2019-09-26 09:16:43matrixisesetmessages: + msg353282
2019-09-26 09:15:26matrixisesetmessages: + msg353281
2019-09-26 09:09:27miss-islingtonsetpull_requests: + pull_request15996
2019-09-26 09:09:20miss-islingtonsetpull_requests: + pull_request15995
2019-09-26 09:09:16matrixisesetmessages: + msg353278
2019-09-12 09:27:14matrixisesetnosy: + matrixise

messages: + msg352070
versions: - Python 3.5, Python 3.6
2019-09-12 08:58:48Mohammad Dehghansetmessages: + msg352060
2019-09-12 08:57:45python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request15639
2019-09-12 08:27:19Mohammad Dehghansetnosy: - docs@python
messages: + msg352057
2019-09-12 08:13:05Mohammad Dehghancreate