Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset __len__ after bf.clear_all() #77

Open
jbrockmendel opened this issue Jan 21, 2017 · 1 comment
Open

Reset __len__ after bf.clear_all() #77

jbrockmendel opened this issue Jan 21, 2017 · 1 comment

Comments

@jbrockmendel
Copy link

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.

@mizvyt
Copy link

mizvyt commented Jan 13, 2020

I've confirmed this issue exists in pybloomfiltermmap3 as well. See prashnts/pybloomfiltermmap3#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants