summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/builtin_hash.py
blob: c4c7019b47e3c6505ec1e59330babcb1b5b3ac16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
# test builtin hash function

class A:
    def __hash__(self):
        return 123
    def __repr__(self):
        return "a instance"

print(hash(A()))
print({A():1})