From b8a053aeb1bec41af11c9937de3c81b7b34c7566 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 11 Apr 2014 10:10:37 +0100 Subject: py: Implement float and complex == and !=. Addresses issue #462. --- py/objcomplex.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'py/objcomplex.c') diff --git a/py/objcomplex.c b/py/objcomplex.c index 23c67eb6e1..8d8ebd2b25 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -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 } -- cgit v1.2.3