RuntimeError: dictionary changed size during iteration

Robert Dailey rcdailey at gmail.com
Mon Dec 8 23:56:19 CET 2008


I'm executing the following code:

def CopyBoost( libraries ):
    pass

def CopyEmotionFX( libraries ):
    pass


def Copy( library, aliases ):
    pass

stuff = vars()
for key in stuff:
    print( key, '--', stuff[key] )



I get the following error message:
('CopyEmotionFX', '--', <function CopyEmotionFX at 0x0205BF70>)
Traceback (most recent call last):
  File "C:\IT\work\jewett\depends.py", line 12, in <module>
    for key in stuff:
RuntimeError: dictionary changed size during iteration

Why is this happening?



More information about the Python-list mailing list