[Patches] [Patch #101277] Catch errors raised by comparisons during dictionary lookup.

noreply@sourceforge.net noreply@sourceforge.net
Thu, 24 Aug 2000 09:00:58 -0700


Patch #101277 has been updated. 

Project: 
Category: core (C code)
Status: Open
Summary: Catch errors raised by comparisons during dictionary lookup.

Follow-Ups:

Date: 2000-Aug-24 15:44
By: fdrake

Comment:
THIS PATCH IS NOT READY!

This attempts to fix the bug described in SourceForge bug #112558.

In attempting to catch and ignore errors raised by PyObject_Compare(), it checks for those errors, and, if found, clears them and continues to search for another entry.  

Unfortunately, this doesn't quite work.  It fixes the specific case presented in the bug report, but causes other cases to fail.  Running the regression tests for compile, getopt, sre, strftime, and tokenize all fail when PyEval_CallObjectWithKeywords() or eval_code2() detect an error return without an exception being set.

Is should note that errors are detected in these cases when PyObject_Compare() is returning 0; I'm not actually seeing any cases where the comparison is returning non-zero other than the test case in the bug report.

I'd really appreciate some help on this one!
-------------------------------------------------------

Date: 2000-Aug-24 16:00
By: gvanrossum

Comment:
Fine, except that there are two fprintf statements that should be taken out!
After that, check it in and close it, presuming "make test" succeeds.
(I would hope that you have tried this before submitting.)
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101277&group_id=5470