New submission from Nick Coghlan <[EMAIL PROTECTED]>:

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.

----------
components: Interpreter Core
messages: 76732
nosy: ncoghlan
severity: normal
status: open
title: Exception traceback is incorrect for strange exception handling
versions: Python 3.0

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4486>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to