Document.__del__ called when object garbage collected, not just when `del doc`
nirvinehh opened this issue · 2 comments
nirvinehh commented
I think this method should be __delitem__(_id)
on Database
. __del__
gets called on garbage collection:
>>> class Foo(object):
... def __del__(self):
... print '__del__'
...
>>> def make_foo():
... f = Foo()
...
>>> make_foo()
__del__
The tests pass because __del__
represses exceptions.
garbados commented
Oh jeez, good point. Will fix.