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.

Author ncoghlan
Recipients ncoghlan
Date 2008-12-02.10:33:56
SpamBayes Score 1.7330898e-05
Marked as misclassified No
Message-id <1228214038.9.0.934760513423.issue4486@psf.upfronthosting.co.za>
In-reply-to
Content
The interactive interpreter doesn't appear to like it if __cause__ and
__context__ are both set on the current exception.

=================
>>> try:
...   raise IOError
... except:
...   raise AttributeError from KeyError
...
KeyError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
IOError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
AttributeError
=================

I'm not entirely sure what *should* be displayed here (the code I typed
in is admittedly bizarre), but what is currently being displayed
definitely isn't right.
History
Date User Action Args
2008-12-02 10:33:59ncoghlansetrecipients: + ncoghlan
2008-12-02 10:33:58ncoghlansetmessageid: <1228214038.9.0.934760513423.issue4486@psf.upfronthosting.co.za>
2008-12-02 10:33:57ncoghlanlinkissue4486 messages
2008-12-02 10:33:56ncoghlancreate