py: Shorten error messages by using contractions and some rewording.

This commit is contained in:
Damien George
2018-06-20 21:02:11 +10:00
parent 0a36a80f96
commit b01f66c5f1
18 changed files with 36 additions and 36 deletions

View File

@@ -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;