Antoine Pitrou added the comment: > No, the suggestion is to only adopt the first part of the patch from 2010, > which is to revert KeyError to behave like LookupError again
That ship has sailed long ago. 2.7, 3.4 and 3.5 (the three major Python versions currently in use) all have the same behaviour, and nobody seems to complain very loudly: >>> {}['foo'] Traceback (most recent call last): File "<ipython-input-2-3761c7dc3711>", line 1, in <module> {}['foo'] KeyError: 'foo' >>> KeyError('foo') KeyError('foo') >>> print(KeyError('foo')) 'foo' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2651> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com