durusmail: durus-users: Durus Change Preview
Durus Change Preview
2006-10-25
2006-10-25
2006-10-25
2006-10-25
2006-10-25
2006-10-25
2006-10-25
2006-10-25
2006-10-25
2006-10-25
2006-10-31
2006-10-31
Durus Change Preview
Patrick K. O'Brien
2006-10-26
David Binger wrote:
>
> On Oct 26, 2006, at 9:30 AM, Patrick K. O'Brien wrote:
>
>> That looks simple and clever.  I wonder if it might make it difficult to
>> debug if there was a problem in the new class.  Perhaps combining it
>> with a class rename so that on subsequent loads the unpickler knows the
>> real class name?
>
> There is no need for that.  Run this script, and the next time you start,
> the class of root really is Persistent.  It doesn't change the
> name of the class of the root instance, it changes the actual
> class of the root instance.

Ah, of course!  The pickler is going to get the module name and class
name from the new class, so everything works out great.  Very nice.  :-)

--
Patrick K. O'Brien
Orbtech       http://www.orbtech.com
Schevo        http://www.schevo.org
Louie         http://www.pylouie.org
reply