summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/objtype.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/objtype.c b/py/objtype.c
index 0977a67ce..e320adc8b 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -549,6 +549,7 @@ retry:;
} else if (dest[0] != MP_OBJ_NULL) {
dest[2] = rhs_in;
res = mp_call_method_n_kw(1, 0, dest);
+ res = op == MP_BINARY_OP_CONTAINS ? mp_obj_new_bool(mp_obj_is_true(res)) : res;
} else {
// If this was an inplace method, fallback to normal method
// https://docs.python.org/3/reference/datamodel.html#object.__iadd__ :