diff options
author | Damien George <damien.p.george@gmail.com> | 2019-12-23 00:00:53 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-12-27 12:53:36 +1100 |
commit | f5eec903fa961135296e2656821450979e413248 (patch) | |
tree | 2c8f804d0cc86a4b5c4d3a5febd7e63fb31900a2 /tests/basics/class_notimpl.py | |
parent | de8c04317be76222d2fbe7c5bf50ffd5ff2fd140 (diff) | |
download | micropython-f5eec903fa961135296e2656821450979e413248.tar.gz micropython-f5eec903fa961135296e2656821450979e413248.zip |
py/objsingleton: Use mp_generic_unary_op for singleton objects.
So these types more closely match NoneType, eg they can be hashed, like in
CPython.
Diffstat (limited to 'tests/basics/class_notimpl.py')
-rw-r--r-- | tests/basics/class_notimpl.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/basics/class_notimpl.py b/tests/basics/class_notimpl.py index 308075f92f..58e790716b 100644 --- a/tests/basics/class_notimpl.py +++ b/tests/basics/class_notimpl.py @@ -48,3 +48,6 @@ except TypeError: # NotImplemented isn't handled specially in unary methods print(-c) + +# Test that NotImplemented can be hashed +print(type(hash(NotImplemented))) |