[Tutor] creating bitmasks (for bloom filters)

Aaron Straup Cope asc at vineyard.net
Mon Jun 14 14:53:48 EDT 2004


On Fri, 2004-06-11 at 09:12, Glen Wheeler wrote:

>   Not sure of your terminology here; does this mean you are mathematically
> inclined?  Or not as such?

I am not especially mathematically inclined. Given enough time I can
usually start to "get" it but it is not my strong suit.

>   Perhaps the source of pybloom would help?  If it's only difference is
> reliance on the unix math libraries, then this could be changed easily
> enough...?

Pybloom is calling mpz.mpz which is supposed to : "Create a new
mpz-number. value can be an integer, a long, another mpz-number, or even
a string. If it is a string, it is interpreted as an array of radix-256
digits, least significant digit first, resulting in a positive number"

http://cvs.sourceforge.net/viewcvs.py/pybloom/pybloom/bloom.py?rev=1.1.1.1&view=auto
http://www.python.org/doc/current/lib/module-mpz.html

The docs for mpz indicate that it is deprecated, as of Python 2.3, in
favour of two possible alternatives.

I'm not sure that I haven't jumped from the frying pan in to the fire,
though :-)




More information about the Tutor mailing list