how can I clear a dictionary in python

Russ uymqlp502 at sneakemail.com
Thu Mar 29 21:10:38 EDT 2007


This little squabble got me thinking. I normally just use the
myDict={} method of "clearing" a
dictionary when I know there are no other references to it. However, I
wonder how the
efficiency of relying on the garbage collector to clear a dictionary
compares with using the
"clear" method. Does anyone know?




More information about the Python-list mailing list