Skip to content

Instantly share code, notes, and snippets.

@anddam
Created December 16, 2016 08:44
Show Gist options
  • Save anddam/8941b6fe0e26c4f2271fb5e7fd75523d to your computer and use it in GitHub Desktop.
Save anddam/8941b6fe0e26c4f2271fb5e7fd75523d to your computer and use it in GitHub Desktop.
# coding: utf-8
class Test:
def __init__(self, seed=0):
self.seed = seed
def __hash__(self):
return seed
def print_bits(seed):
print("{:0>64s}".format(bin(Test(seed).__hash__())[2:]))
print("{:0>64s}".format(bin(hash(Test(seed)))[2:]))
print_bits(0xBF0F0F0F0F0F0F14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment