Skip to content

Add context manager support #29

Description

@mizvyt

[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 #14 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions