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
David Binger
2006-10-25
On Oct 25, 2006, at 3:14 PM, Mike Orr wrote:

> Is the root object different than other persistent objects in some way
> I don't understand?

No.  The only difference between the root and another persistent object
is that the root is always the one whose _p_oid is 8 bytes of zeros.

> Doesn't Durus load and save it like any other
> object?

Yes.

> Why should Durus care whether it has slots or not?

Python cares whether classes have slots or not.
Durus does not really care.

> Doesn't
> Durus just instantiate it, insert it in the database, and forget about
> it?

It does.  The challenge is only there if you want to mutate the class
of an existing instance.

>
> If the root object has to have certain slots, it's not the end of the
> world.  But it seems a pity to make Durus less flexible unless there's
> a compelling reason to.

It isn't impossible to change the class of the root after this
change.  It is just that the recipe for doing it is a bit longer,
and the same goes for changing the class of any persistent instance
that uses data for slots.




reply