Damien George
10 years ago
1 changed files with 10 additions and 0 deletions
@ -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}) |
Loading…
Reference in new issue