I'd like some help with fixing a bug in dictobject.c. The bug is on SourceForge as #112558, and my attempted fix is SourceForge patch #101277. The original bug is that exceptions raised by an object's __cmp__() during dictionary lookup are not cleared, and can be propogated during a subsequent lookup attempt. I've made more detailed comments at SourceForge at the patch: http://sourceforge.net/patch/?func=detailpatch&patch_id=101277&group_id=5470 Thanks for any suggestions! -Fred -- Fred L. Drake, Jr. <fdrake at beopen.com> BeOpen PythonLabs Team Member
"Fred L. Drake, Jr." wrote:
I'd like some help with fixing a bug in dictobject.c. The bug is on SourceForge as #112558, and my attempted fix is SourceForge patch #101277. The original bug is that exceptions raised by an object's __cmp__() during dictionary lookup are not cleared, and can be propogated during a subsequent lookup attempt. I've made more detailed comments at SourceForge at the patch:
http://sourceforge.net/patch/?func=detailpatch&patch_id=101277&group_id=5470
Thanks for any suggestions!
Here are some: * Please be very careful when patching this area of the interpreter: it is *very* performance sensitive. * I'd remove the cmp variable and do a PyErr_Occurred() directly in all cases where PyObect_Compare() returns != 0. * Exceptions during dict lookups are rare. I'm not sure about failing lookups... Valdimir ? -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
participants (2)
-
Fred L. Drake, Jr.
-
M.-A. Lemburg