Message 274844 - Python tracker

Message274844

Author rhettinger
Recipients Julian, amaury.forgeotdarc, belopolsky, eric.araujo, lukasz.langa, martin.panter, pitrou, rharris, rhettinger, vencabot_teppoo
Date 2016-09-07.17:26:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473269176.13.0.0483743080561.issue2651@psf.upfronthosting.co.za>
In-reply-to
Content
The current behavior seems to be a recurring source of confusion and bugs, so something needs to change.  I'm thinking that the least egregious thing to do is to remove (in 3.6) the special case code for KeyError.  The small downside is that KeyError('')  wouldn't look as good.  The benefit is that we eliminate an unexpected special case and make KeyErrors behave like all the other exceptions including LookupError. 

I'm against the two-args solution as being too disruptive.  Since args[0] is currently the only reliable way of extracting the key, prepending a message field will likely break much existing code that really wants to access the key.
History
Date User Action Args
2016-09-07 17:26:16rhettingersetrecipients: + rhettinger, amaury.forgeotdarc, belopolsky, pitrou, rharris, eric.araujo, vencabot_teppoo, lukasz.langa, Julian, martin.panter
2016-09-07 17:26:16rhettingersetmessageid: <1473269176.13.0.0483743080561.issue2651@psf.upfronthosting.co.za>
2016-09-07 17:26:16rhettingerlinkissue2651 messages
2016-09-07 17:26:16rhettingercreate