py: Shorten error messages by using contractions and some rewording.
This commit is contained in:
@@ -195,13 +195,13 @@ mp_obj_t mp_obj_complex_binary_op(mp_binary_op_t op, mp_float_t lhs_real, mp_flo
|
||||
}
|
||||
case MP_BINARY_OP_FLOOR_DIVIDE:
|
||||
case MP_BINARY_OP_INPLACE_FLOOR_DIVIDE:
|
||||
mp_raise_TypeError("can't do truncated division of a complex number");
|
||||
mp_raise_TypeError("can't truncate-divide a complex number");
|
||||
|
||||
case MP_BINARY_OP_TRUE_DIVIDE:
|
||||
case MP_BINARY_OP_INPLACE_TRUE_DIVIDE:
|
||||
if (rhs_imag == 0) {
|
||||
if (rhs_real == 0) {
|
||||
mp_raise_msg(&mp_type_ZeroDivisionError, "complex division by zero");
|
||||
mp_raise_msg(&mp_type_ZeroDivisionError, "complex divide by zero");
|
||||
}
|
||||
lhs_real /= rhs_real;
|
||||
lhs_imag /= rhs_real;
|
||||
|
||||
Reference in New Issue
Block a user