[Python-Dev] Re: Fatal scoping error from the twilight zone

Jeremy Hylton jeremy@alum.mit.edu
Mon, 12 Feb 2001 11:01:59 -0500 (EST)


The bug was easy to fix after all.  I figured the problem had to be
related to dictionary traversal, because that was the only sensible
explanation for why the specific letter mattered; different letters
have different hash values, so the dictionary ends up storing names in
a different order.

The problem, fixed in rev. 2.163 of compile.c, was caused by iterating
over a dictionary using PyDict_Next() and updating it at the same
time.  The updates are now deferred until the iteration is done.

Jeremy