[ZODB-Dev] Mutating class of an instance
    Shane Hathaway 
    shane at hathawaymix.org
       
    Wed Jul  2 14:28:35 EDT 2008
    
    
  
Erik Dahl wrote:
> I have a situation where I want to mutate the class of an instance  
> like this:
> 
> inst.__class__ = NewClass
> 
> I'm in zeo land.  When I do this in one client things work fine.  But  
> of course the other clients who have already loaded the instance still  
> hold the old class.  Restarting them gets the new class so it did get  
> stored properly in the pickle (which I would expect).  Any chance I  
> can get zeo to tell the other clients about the new class?
Although there might be ways to accomplish that, I don't believe it is 
good practice.  If you explain what you're trying to accomplish, perhaps 
the group can find a better approach.
Shane
    
    
More information about the ZODB-Dev
mailing list