13 May
2004
13 May
'04
7:30 a.m.
I have a bunch of objects in the ZODB that I need to convert to other objects. The new object have the same meta_type and the same attributes. But they are of a new class. So I thought that I could simply assign a new class. I tried assigning the new class to __class__ but that didn't work. Like:: obj.__class__ = SomeNewClass I suspect that is because I am assigning it to an aquisition wrapper. But I am not shure. Would I need to do something like? base = obj.aq_base base.__class__ = SomeNewClass -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science