What about going a step further? I don’t think any of the Tree operations make sense on a closed Storage instance, so would it make sense to move the _assert_not_closed method to the Tree class and call it in each of its methods? That would remove the need for DBDB to keep a reference to a Storage instance at all - it would just be an adapter to BinaryTree.