py: Implement float and complex == and !=.

Addresses issue #462.
This commit is contained in:
Damien George
2014-04-11 10:10:37 +01:00
parent 686afc5c0a
commit b8a053aeb1
3 changed files with 20 additions and 29 deletions

View File

@@ -205,6 +205,8 @@ mp_obj_t mp_obj_complex_binary_op(int op, mp_float_t lhs_real, mp_float_t lhs_im
break;
}
case MP_BINARY_OP_EQUAL: return MP_BOOL(lhs_real == rhs_real && lhs_imag == rhs_imag);
default:
return MP_OBJ_NULL; // op not supported
}