A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/065376.html below:

[Python-Dev] Let's stop eating exceptions in dict lookup

[Python-Dev] Let's stop eating exceptions in dict lookupRaymond Hettinger raymond.hettinger at verizon.net
Mon May 29 23:02:25 CEST 2006
> On Mon, May 29, 2006 at 12:20:44PM -0700, Raymond Hettinger wrote:
>> > I've finally come around to writing a patch that stops dict lookup from
>> > eating all exceptions that occur during lookup, like rare bugs in user
>> > __eq__() methods.
>>
>> Is there a performance impact?
>
> I believe that this patch is good anyway, because I consider my (and
> anybody's) debugging hours worth more than a few seconds of a
> long-running process.  You get *really* obscure bugs this way.
>
> I would also point out that this is the kind of feature that should not
> be traded off for performance, otherwise we'd loose much of the point of
> Python.  IMHO.
>
> As it turns out, I measured only 0.5% performance loss in Pystone.

Please run some better benchmarks and do more extensive assessments on the 
performance impact.

The kind of obscure bug you're trying to kill does not affect 99.9% of Python 
users; however, loss of performance will affect everyone.  This is arguably the 
most actively exercised part of the Python and should not be changed without 
carefully weighing purity vs practicality.

FWIW, I applied a similar patch to set objects in Py2.5 so that they wouldn't 
eat exceptions.  So, I'm truly sympathetic to the cause.  However, dicts are 
much more critical.  There needs to be a careful judgement based on measurements 
and assessments of whether there are real benefits for everyday Python users.


Raymond








More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4