[issue1182143] making builtin exceptions more informative

George Jenkins report at bugs.python.org
Sat Jun 27 17:55:41 CEST 2015


George Jenkins added the comment:

Thanks for the response.

In terms of python API changes - I exposed the 'name' attribute on UnboundLocalError and NameError exceptions. 

(This can be seen (& is verified) by the changes to test_exceptions.py exceptions test cases in the patch)

In terms of the wider changes in the patch - I factored UnboundLocalError and NameError to have specific native implementations, rather than been based off SimpleExtendsException. And thus able to accept the name of the variable causing the exception.

And I agree with your comment on the exact API never been agreed on. Since there are now native implementations of UnboundLocalError and NameError, I can happily change their implementation to expose whatever can be decided to be better (comments?!)

Thanks, George

----------

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


More information about the Python-bugs-list mailing list