Raymond Hettinger <pyt...@rcn.com> writes:
> Here's a 22-line beauty for a classic and amazing algorithm:
> http://bit.ly/bloom_filter

The use of pickle to serialize the keys is a little bit suspicious if
there might be a reason to dump the filter to disk and re-use it in
another run of the program.  Pickle representation might change between
Python releases, for example.  It's just supposed to stay interoperable
between versions, not necessarily bitwise-identical.

Otherwise it's quite nice.  I'd suggest adding a .update() operation
that adds keys from a user-supplied iterator.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to