Created
December 16, 2016 08:44
-
-
Save anddam/8941b6fe0e26c4f2271fb5e7fd75523d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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