This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Julian, amaury.forgeotdarc, belopolsky, eric.araujo, lukasz.langa, martin.panter, pitrou, rharris, rhettinger, vencabot_teppoo
Date 2016-09-07.18:40:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473273653.64.0.768221051516.issue2651@psf.upfronthosting.co.za>
In-reply-to
Content
> 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'
History
Date User Action Args
2016-09-07 18:40:53pitrousetrecipients: + pitrou, rhettinger, amaury.forgeotdarc, belopolsky, rharris, eric.araujo, vencabot_teppoo, lukasz.langa, Julian, martin.panter
2016-09-07 18:40:53pitrousetmessageid: <1473273653.64.0.768221051516.issue2651@psf.upfronthosting.co.za>
2016-09-07 18:40:53pitroulinkissue2651 messages
2016-09-07 18:40:53pitroucreate