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:
Damien George
2019-12-23 00:00:53 +11:00
parent de8c04317b
commit f5eec903fa
3 changed files with 7 additions and 0 deletions

View File

@@ -4,3 +4,6 @@ print(...)
print(Ellipsis)
print(... == Ellipsis)
# Test that Ellipsis can be hashed
print(type(hash(Ellipsis)))