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.
Created on 2011年03月25日 08:42 by gwideman, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue11669-default.patch | sandro.tosi, 2011年06月25日 16:06 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg132072 - (view) | Author: Graham Wideman (gwideman) | Date: 2011年03月25日 08:42 | |
In Language Ref section 7 "Compound Statements": http://docs.python.org/release/3.1.3/reference/compound_stmts.html there's a footnote regarding what happens to unhandled exceptions in a try-except statement: [1] The exception is propagated to the invocation stack only if there is no *finally* clause that negates the exception. This is very unclearly worded, especially since the reader in need of this footnote is probably familiar with the *except* clause being the one to "negate" an exception, and may well think this footnote is in error. This footnote could provide a more convincing explanation: [1] The exception is propagated to the invocation stack unless there is a finally clause which happens to raise another exception. That new exception causes the old exception to be lost. |
|||
| msg137816 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2011年06月07日 11:58 | |
Keywords suggest that there should to be a patch here. Where is it? |
|||
| msg138262 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2011年06月13日 16:27 | |
Sometimes we use the patch keyword for doc issues where someone has suggested a specific new wording but not generated an actual patch. That seems to be the case here. |
|||
| msg139092 - (view) | Author: Sandro Tosi (sandro.tosi) * (Python committer) | Date: 2011年06月25日 16:05 | |
Just to make explicit what's happening:
>>> try:
... try:
... raise TypeError()
... finally:
... raise ValueError()
... except TypeError as e:
... print('mmm')
...
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
TypeError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
ValueError
while
>>> try:
... try:
... raise TypeError()
... finally:
... raise ValueError()
... except ValueError as e:
... print ('mmm')
...
mmm
|
|||
| msg139093 - (view) | Author: Sandro Tosi (sandro.tosi) * (Python committer) | Date: 2011年06月25日 16:05 | |
Ok, I send it too soon... attached is a patch to fix this bug (it applies on default, 3.2 and 2.7). |
|||
| msg139152 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年06月26日 08:38 | |
New changeset b11e7bc76d07 by Ezio Melotti in branch '2.7': #11669: rephrase footnote in the Compound Statements page. http://hg.python.org/cpython/rev/b11e7bc76d07 New changeset 74e9f94d8440 by Ezio Melotti in branch '3.2': #11669: rephrase footnote in the Compound Statements page. http://hg.python.org/cpython/rev/74e9f94d8440 New changeset a7099a3b5e5f by Ezio Melotti in branch 'default': #11669: merge with 3.2. http://hg.python.org/cpython/rev/a7099a3b5e5f |
|||
| msg139153 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2011年06月26日 08:41 | |
Fixed, thanks for the patch! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:15 | admin | set | github: 55878 |
| 2011年07月21日 09:33:42 | ezio.melotti | set | nosy:
+ ncoghlan |
| 2011年06月26日 08:41:23 | ezio.melotti | set | status: open -> closed assignee: docs@python -> ezio.melotti nosy: + ezio.melotti messages: + msg139153 resolution: fixed stage: patch review -> resolved |
| 2011年06月26日 08:38:38 | python-dev | set | nosy:
+ python-dev messages: + msg139152 |
| 2011年06月25日 16:06:18 | sandro.tosi | set | keywords:
- needs review files: + issue11669-default.patch |
| 2011年06月25日 16:05:53 | sandro.tosi | set | messages: + msg139093 |
| 2011年06月25日 16:05:24 | sandro.tosi | set | nosy:
+ sandro.tosi messages: + msg139092 |
| 2011年06月13日 16:28:07 | r.david.murray | set | versions: - Python 3.1 |
| 2011年06月13日 16:27:16 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg138262 |
| 2011年06月07日 11:58:54 | petri.lehtinen | set | nosy:
+ petri.lehtinen messages: + msg137816 |
| 2011年03月25日 16:10:34 | eric.araujo | set | keywords:
+ patch, needs review stage: patch review versions: - Python 2.6, Python 2.5, Python 3.4 |
| 2011年03月25日 08:42:54 | gwideman | create | |