This line: `netmask = 0x100000000 - 2**(32-self.mask)` should not use exponentiation, it should use bit-shifts. Exponents coerce the expression to float and the code after fails when it tries to use "&".
This line:
netmask = 0x100000000 - 2**(32-self.mask)should not use exponentiation, it should use bit-shifts. Exponents coerce the expression to float and the code after fails when it tries to use "&".