[Zope] Python products - Versions in Zope
Edward Muller
edwardam@home.com
Tue, 12 Jun 2001 23:25:42 -0500
On Tuesday 12 June 2001 03:08, Dieter Maurer wrote:
> =?iso-8859-1?Q?Max=5FM=F8ller=5FRasmussen?= writes:
> > > From: Andy [mailto:andy@agmweb.ca]
> > >
> > > We separate dev staging and production totally by having
> > > totally different
> > > Zopes, only putting new versions live once tested (in theory :).
> >
> > Well yes ... I do that too. But often I have a product up and running,
> > and I have to make an updated product that is incompatible with the old
> > one. What I wondered about is how to upgrade from version 1.0 to 1.1 of
> > the same products as easy as possible.
>
> The main problem should be members the new objects have while
> the old do not.
>
> There are two approaches, I know of:
>
> 1. define class variables as defaults for these new members
>
> class C: # new product
> new_member= None
>
> def method(self):
> if self.new_member is None:
> # may need to do something
> ...
>
>
> 2. instantiate the new instance variables in the "__getstate__" method.
Can anyone tell me where __getstate__ is documented?
--
Edward Muller - edwardam@home.com - edwardam@handhelds.org
After 16 years, MTV has finally completed its deevolution into the shiny
things network --The Onion