-
- Downloads
py/objnone: Remove unnecessary handling of MP_UNARY_OP_BOOL.
bool(None) has a fast path in mp_obj_is_true so doesn't need to be handled in none_unary_op. The only caveat is that subclassing may bypass the mp_obj_is_true function, but actually you aren't allowed to subclass classes that have singleton instances like NoneType (see https://mail.python.org/pipermail/python-dev/2002-March/020822.html for reference on this point).
Please register or sign in to comment