Skip to content

Commit bab5cfb

Browse files
committed
Unsupported operand types for binary operator: dump both args' types.
1 parent d6f27fe commit bab5cfb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

py/runtime.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,9 @@ mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
536536
}
537537

538538
// TODO specify in error message what the operator is
539-
nlr_jump(mp_obj_new_exception_msg_varg(MP_QSTR_TypeError, "unsupported operand type for binary operator: '%s'", mp_obj_get_type_str(lhs)));
539+
nlr_jump(mp_obj_new_exception_msg_varg(MP_QSTR_TypeError,
540+
"unsupported operand types for binary operator: '%s', '%s'",
541+
mp_obj_get_type_str(lhs), mp_obj_get_type_str(rhs)));
540542
}
541543

542544
mp_obj_t rt_compare_op(int op, mp_obj_t lhs, mp_obj_t rhs) {

0 commit comments

Comments
 (0)