mirror of
https://github.com/micropython/micropython.git
synced 2026-01-09 13:40:31 +01:00
__bool__() and __len__() are just the same as __neg__() or __invert__(), and require efficient dispatching implementation (not requiring search/lookup). type->unary_op() is just the right choice for this short of adding standalone virtual method(s) to already big mp_obj_type_t structure.
4.5 KiB
4.5 KiB