circuitpython/tests/basics/builtin_hash.py
2014-11-15 18:30:01 +00:00

11 lines
167 B
Python

# test builtin hash function
class A:
def __hash__(self):
return 123
def __repr__(self):
return "a instance"
print(hash(A()))
print({A():1})