Pickling an instance of a class containing a dict doesn't work
marco.lierfeld at rwth-aachen.de
Fri Oct 13 09:27:49 CEST 2006
Peter Otten wrote:
> Chances are you have inadvertently created an /instance/ attribute
> build_steps which was then saved:
> s = subproject()
> # ...
> s.configuration["name"] = "my dinner" # modifies the class attribute
> s.build_steps = ["hunt", "kill", "cook"] # creates an instance attribute
Yes, now I see. That's the way I filled the dict and the list.
Thank you for the explanation :)
More information about the Python-list