[ZODB-Dev] BTrees package problems

Jim Fulton jim at zope.com
Wed Jul 24 15:46:16 CEST 2013


On Tue, Jul 23, 2013 at 9:12 PM, Christian Tismer <tismer at stackless.com> wrote:
...
> What I'm after is a way to over-ride the implementation by user code.
> I did not yet check it this is implemented already, in the Python way of
> sub-classing built-ins.

BTrees (somewhet to mysurprise, do support subclassing, although you'll need
to write custom __getstate__ and __setstate__ methods to handle both the BTree
data and instance data.  It would be better if the methods provided by
the BTree classes
handled this automatically (by checking for an instance dictionary or slots).

Also, the BTree implementation isn't informed by user provided
attributes.  It would be better
if it was.  For example. I'd like bucket and internal node sizes to be
controllable via instance
attributes (typically defined in a subclass.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton


More information about the ZODB-Dev mailing list