py/objtuple: Add support for inplace add (same as normal add).
This commit is contained in:
parent
dcd8f52766
commit
81d2ca2b12
@ -138,7 +138,8 @@ mp_obj_t mp_obj_tuple_unary_op(mp_uint_t op, mp_obj_t self_in) {
|
||||
mp_obj_t mp_obj_tuple_binary_op(mp_uint_t op, mp_obj_t lhs, mp_obj_t rhs) {
|
||||
mp_obj_tuple_t *o = MP_OBJ_TO_PTR(lhs);
|
||||
switch (op) {
|
||||
case MP_BINARY_OP_ADD: {
|
||||
case MP_BINARY_OP_ADD:
|
||||
case MP_BINARY_OP_INPLACE_ADD: {
|
||||
if (!mp_obj_is_subclass_fast(MP_OBJ_FROM_PTR(mp_obj_get_type(rhs)), MP_OBJ_FROM_PTR(&mp_type_tuple))) {
|
||||
return MP_OBJ_NULL; // op not supported
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user