summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/builtin_hash.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/basics/builtin_hash.py b/tests/basics/builtin_hash.py
new file mode 100644
index 0000000000..c4c7019b47
--- /dev/null
+++ b/tests/basics/builtin_hash.py
@@ -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})