diff options
Diffstat (limited to 'tests/basics/builtin_hash.py')
-rw-r--r-- | tests/basics/builtin_hash.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/basics/builtin_hash.py b/tests/basics/builtin_hash.py index c4c7019b47..0abfe980e1 100644 --- a/tests/basics/builtin_hash.py +++ b/tests/basics/builtin_hash.py @@ -1,5 +1,16 @@ # test builtin hash function +print(hash(False)) +print(hash(True)) +print({():1}) # hash tuple +print({1 << 66:1}) # hash big int +print(hash in {hash:1}) # hash function + +try: + hash([]) +except TypeError: + print("TypeError") + class A: def __hash__(self): return 123 |