bitly/dablooms — pull request #50 by peterjc (2012-09-12 14:27:00+00:00)
Title: Support 'key in bloom' in Python wrapper.

It is more Pythonic to write:

key in bloom

than

bloom.check(key)

Support for 'in' is normally implemented via a \_\_contains\_\_ method for a class written in Python, but here we are using the C API, this the patch implements a sq\_contains slot function.

Note this implementation only looks for strings (anything else returns False).

Also note this is the first time I've tried implementing 'in' via the Python C API, please review with care.