tests: Add test for hash of user defined class.

This commit is contained in:
Damien George 2014-11-15 18:30:01 +00:00
parent e00eeaf4cd
commit 4df85e49d4
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# test builtin hash function
class A:
def __hash__(self):
return 123
def __repr__(self):
return "a instance"
print(hash(A()))
print({A():1})