Eliminate __dict__ from persistent btree, bnode,
dict, list and set
Patrick K. O'Brien
2006-07-05
Mike Orr wrote:
>
> There's no reason the root class has to be a PersistentDict.
> PersistentDict could be made slotted, and the root object a special
> subclass that supports attribute assignment.
Yes and no. The problem is pickles. Python stores the class.__module__
and class.__name__ as part of the pickle. So any existing Durus
databases will be stuck with PersistentDict (or would require a
conversion) if Durus wanted to allow something other than a
PersistentDict instance as the root. So it wouldn't be impossible, but
in many ways it is simpler for Durus to only have one kind of root.
--
Patrick K. O'Brien
Orbtech http://www.orbtech.com
Schevo http://www.schevo.org
Louie http://www.pylouie.org