mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
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.
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user