[Zope3-dev] Re: [Zope] Zope (X)3 FAQ

Steve Alexander steve@cat-box.net
Tue, 22 Apr 2003 14:41:13 +0200


> How do you ensure that the object hasb't already had this __setstate__ 
> modification done on it?

You look at its state, then decide based on the state.
Or, you make the upgrade process idempotent.

In the schemagen package, objects have an attribute that indicates what 
version of the class the data goes with.


> What are the performance implications of using __setstate__ in this way?

It usually works pretty well.

--
Steve Alexander