Author josh.r
Recipients Antony.Lee, Jim.Jewett, Trundle, Yury.Selivanov, barry, benjamin.peterson, cvrebert, daniel.urban, eric.araujo, gcbirzan, georg.brandl, gvanrossum, jamesh, josh.r, jwilk, ncoghlan, pitrou, yorik.sar
Date 2015-10-21.01:47:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1445392067.96.0.827921815162.issue12029@psf.upfronthosting.co.za>
In-reply-to
Content
Does this introduce a slowdown when the type doesn't match? That is, clearly George's example:

try:
    {}["a"]                       
except KeyError:
    pass

won't be slowed because the fast path will get an immediate hit. But what about:


try:
    {}["a"]
except TypeError:
    pass
except ValueError:
    pass
except KeyError:
    pass

(or with the KeyError handler higher up the call stack). The fast path speeds up the handled case, but it doesn't seem like it would help the unhandled case (where it would need to check the slow path for each unhandled exception type one at a time).
History
Date User Action Args
2015-10-21 01:47:48josh.rsetrecipients: + josh.r, gvanrossum, barry, georg.brandl, jamesh, ncoghlan, pitrou, benjamin.peterson, jwilk, eric.araujo, Trundle, cvrebert, daniel.urban, yorik.sar, Yury.Selivanov, Jim.Jewett, gcbirzan, Antony.Lee
2015-10-21 01:47:47josh.rsetmessageid: <1445392067.96.0.827921815162.issue12029@psf.upfronthosting.co.za>
2015-10-21 01:47:47josh.rlinkissue12029 messages
2015-10-21 01:47:47josh.rcreate