diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index abfaa5e..4e9ed96 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -813,12 +813,12 @@ PyNumber_InPlaceAdd(PyObject *v, PyObject *w) PyNumber_Add, 0) <= 0) return x; } - else if ((HASINPLACE(v) + else if (HASINPLACE(v) && ((v->ob_type->tp_as_sequence != NULL && (f = v->ob_type->tp_as_sequence->sq_inplace_concat) - != NULL))) + != NULL) || (v->ob_type->tp_as_number != NULL && - (f = v->ob_type->tp_as_number->nb_inplace_add) != NULL)) + (f = v->ob_type->tp_as_number->nb_inplace_add) != NULL))) return (*f)(v, w); BINOP(v, w, "__add__", "__radd__", PyNumber_Add); |