You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
tests: Add test for hash of user defined class.
This commit is contained in:
@@ -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})
|
||||
Reference in New Issue
Block a user