[ZODB-Dev] RE: B-Tree API - again!
Christian Reis
kiko@async.com.br
Fri, 6 Dec 2002 14:30:48 -0200
On Fri, Dec 06, 2002 at 05:10:02PM +0100, Gfeller Martin wrote:
> > [...] but I can neither inherit from OOBTree (del fails, the
> __delitem__ method isn't inherited) nor easily delegate to it (the
> special methods such as __delitem__ are not exposed).
>
> So using Steve's MyOOBTree class on Python 2.1.3:
>
> >>> bt = MyOOBTree()
> >>> bt['a'] = 1
> >>> del bt['a']
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> AttributeError: __delitem__
Add a __delitem__ in your subclass that calls OOBTree.__delitem__() ?
Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL