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

loss of key after pickle.loads #57

Open
maybe-why-not opened this issue Aug 19, 2024 · 0 comments
Open

loss of key after pickle.loads #57

maybe-why-not opened this issue Aug 19, 2024 · 0 comments

Comments

@maybe-why-not
Copy link

import pybloomfilter
fruit = pybloomfilter.BloomFilter(100000, 0.1, '/tmp/words.bloom')
fruit.update(('apple', 'pear', 'orange', 'apple'))
print(len(fruit))
print('mike' in fruit)
print('apple' in fruit)

import pickle
pickled_fruit = pickle.dumps(fruit)
unpickled_fruit = pickle.loads(pickled_fruit)
print('apple' in unpickled_fruit)

print('apple' in unpickled_fruit) is False
image

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

1 participant