[Python-Dev] Dict suppressing exceptions (original) (raw)

Michael Hudson mwh at python.net
Thu Aug 10 10:23:48 CEST 2006


"Jim Jewett" <jimjjewett at gmail.com> writes:

It wasn't my idea to stop ignoring exceptions in dict lookups; I would gladly have put this off until Py3k, where the main problem (str-unicode eq raising UnicodeError) will go away.

But since people are adamant that they want this in sooner, Is this true for dictionaries specifically? Would there really be strong objections to continuing to swallow any Exception (not BaseException) raised by eq ?

Armin's reason for changing dictionaries in this way was that enormous debugging pain was caused by dicts swallowing exceptions raised by eq methods. Having the eq methods swallow the exceptions by themselves would make the situation worse, not better.

Cheers, mwh

--



More information about the Python-Dev mailing list