Skip to content

Reset __len__ after bf.clear_all() #77

Description

@jbrockmendel

I expected that after bf.clear_all() calling len(bf) would give 0. It looks like it isn't being re-set.

>>> bf = pybloomfilter.BloomFilter(100, .01)
>>> silent = bf.add('foo')
>>>  len(bf)
1
>>> bf.clear_all()
>>> len(bf)
1

I'm getting this for both in-memory and file-based filters, on Ubuntu and OSX. Python 2.7 in each case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions