[issue10221] {}.pop('a') raises non-standard KeyError exception

Alexander Belopolsky report at bugs.python.org
Thu Oct 28 17:44:28 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

There have been several requests for KeyError to grow "key" attribute that will always contain the key that caused the error. See issue 1182143, for example.  If this is done, I think it would be natural to unify the args as well for empty and non-empy case.  Without adding key access API, however, I am at most -0 on changing the error message.   Traditionally, the error messages are not considered part of language specification, so this is not a bug.

----------
nosy: +belopolsky
type: behavior -> feature request
versions:  -Python 2.7, Python 3.1

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


More information about the Python-bugs-list mailing list