diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-11 10:10:37 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-11 10:10:37 +0100 |
commit | b8a053aeb1bec41af11c9937de3c81b7b34c7566 (patch) | |
tree | 167c265085b3035ac17ee6b4eaac48fe15f81642 /py/objcomplex.c | |
parent | 686afc5c0aaf2bc5a8d2547b703ab3177e0ea569 (diff) | |
download | micropython-b8a053aeb1bec41af11c9937de3c81b7b34c7566.tar.gz micropython-b8a053aeb1bec41af11c9937de3c81b7b34c7566.zip |
py: Implement float and complex == and !=.
Addresses issue #462.
Diffstat (limited to 'py/objcomplex.c')
-rw-r--r-- | py/objcomplex.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 } |