mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +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:
@@ -47,6 +47,7 @@ const mp_obj_type_t mp_type_singleton = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_,
|
||||
.print = singleton_print,
|
||||
.unary_op = mp_generic_unary_op,
|
||||
};
|
||||
|
||||
const mp_obj_singleton_t mp_const_ellipsis_obj = {{&mp_type_singleton}, MP_QSTR_Ellipsis};
|
||||
|
||||
Reference in New Issue
Block a user