Skip to content
Snippets Groups Projects
Commit 4df85e49 authored by Damien George's avatar Damien George
Browse files

tests: Add test for hash of user defined class.

parent e00eeaf4
Branches
Tags
No related merge requests found
# test builtin hash function
class A:
def __hash__(self):
return 123
def __repr__(self):
return "a instance"
print(hash(A()))
print({A():1})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment