[New-bugs-announce] [issue7853] on __exit__(), exc_value does not contain the exception.

Florent Xicluna report at bugs.python.org
Thu Feb 4 10:35:09 CET 2010


New submission from Florent Xicluna <laxyf at yahoo.fr>:

On __exit__(), the 3rd argument "exc_value" should contain the instance of the exception.

But in most cases, it contains only the string representation of the exception.

See attached test case.
Same behavior for KeyError, AttributeError, RuntimeError, ...

----------
components: Interpreter Core
files: case_contextmanager_exit.py
messages: 98817
nosy: flox
priority: high
severity: normal
stage: test needed
status: open
title: on __exit__(), exc_value does not contain the exception.
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file16125/case_contextmanager_exit.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7853>
_______________________________________


More information about the New-bugs-announce mailing list