pybloomfiltermmap3 icon indicating copy to clipboard operation
pybloomfiltermmap3 copied to clipboard

Add context manager support

Open mizvyt opened this issue 5 years ago • 0 comments

[todo] we should add __enter__ and __exit__ methods to the BloomFilter class. So we can use the context manager patterns.

This would let us do:

with pybloomfilter.BloomFilter(...) as bf:
  bf.add(test_data)

_Originally posted by @prashnts in https://github.com/prashnts/pybloomfiltermmap3/pull/14#discussion_r349123995

mizvyt avatar Jan 14 '20 01:01 mizvyt