godavemon wrote:
I need to calculate the Hamming Distance of two integers. The hamming
distance is the number of bits in two integers that don't match.
...
What about letting the bits count themselves in a parallel adding scheme:
def hamming(i, j):
i ^= j
i = ((i&044)>>2)+((i&02
nit__(self):
pass
When I substitute the blanks in the string for something else, then the problem
disappears:
class Axis:
axtype = "unknown_type_of_axis"
def __init__(self):
pass
Does anybody have an idea?
Hans Terlouw
--
http://mail.python.org/mailman/listinfo/python-list