[ZODB-Dev] __setstate__

Anton Benard abenard@mems-exchange.org
Thu, 28 Mar 2002 14:19:44 -0500


On Wed, Mar 27, 2002 at 10:43:49PM +0100, Magnus Lyck? wrote:
> Are there any particular gotchas or better alternatives?

If you can it is better to run an update script. Exceptions in
__setstate__ methods get swallowed. Also the code in the __setstate__ is
run everytime an instance of the class is loaded and it does not set the
_p_changed flag so the changes will not be commited unless something
else sets that flag. 

- Anton