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: Implicit exception chaining (PEP 3134)
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, gvanrossum, pitrou
Priority: normal Keywords: patch

Created on 2008-06-13 23:02 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
context.patch pitrou, 2008-06-13 23:02
context2.patch pitrou, 2008-06-14 00:05
Messages (5)
msg68189 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-06-13 23:02
This patch implements implicit except chaining (__context__) as per PEP
3134, or not quite. The difference is that PyErr_Set* functions do set
the __context__ attribute, otherwise I think it would make an annoying
discrepancy between exceptions generated by Python modules and
exceptions generated by C modules (especially when some parts are
written in C and others in Python, e.g. the io library).

Unimplemented are the modifications in exception reporting.
msg68190 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-06-13 23:28
http://codereview.appspot.com/2026
msg68193 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-06-14 00:05
Guido, thanks for your comments. Here is a new patch addressing them.
msg68213 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-06-14 20:21
Submitted as r64281.

We still need a doc patch and changes to the exception printing (perhaps
also to traceback.py).  Please open new issues for those.
msg68216 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-14 20:33
See #3112 and #3113.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47358
2008-06-14 20:33:16benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg68216
2008-06-14 20:21:27gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg68213
2008-06-14 00:05:11pitrousetfiles: + context2.patch
messages: + msg68193
2008-06-13 23:28:17gvanrossumsetnosy: + gvanrossum
messages: + msg68190
2008-06-13 23:02:33pitroucreate