mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
py: Add MP_OBJ_STOP_ITERATION and make good use of it.
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL. This helps a lot in debugging and understanding of function API.
This commit is contained in:
@@ -140,7 +140,7 @@ mp_obj_t mp_obj_float_binary_op(int op, mp_float_t lhs_val, mp_obj_t rhs_in) {
|
||||
case MP_BINARY_OP_MORE_EQUAL: return MP_BOOL(lhs_val >= rhs_val);
|
||||
|
||||
default:
|
||||
return MP_OBJ_NULL; // op not supported
|
||||
return MP_OBJ_NOT_SUPPORTED;
|
||||
}
|
||||
return mp_obj_new_float(lhs_val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user