[Tutor] Replacement for __del__
Alan Gauld
alan.gauld at btinternet.com
Tue May 19 01:13:07 CEST 2009
"Strax-Haber, Matthew (LARC-D320)" <matthew.strax-haber at nasa.gov> wrote
> My class sub-types dict. In __init__, there is a call to
> self.update(pickle.load(<some file>)). For some reason, this triggers
> __del__. Why?
>
A pure guess, but maybe the pickle load creates a new instance which
replaces the original which then gets garbage collected and calls del?
Otherwise go to the source, or step into it with a debugger
Just a thought,
Alan G.
More information about the Tutor
mailing list