diff options
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index cb2807d..622e819 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -742,8 +742,12 @@ PyObject * PyNumber_InPlaceMultiply(PyObject *v, PyObject *w) { PyObject * (*g)(PyObject *, int) = NULL; - if (HASINPLACE(v) && v->ob_type->tp_as_sequence && - (g = v->ob_type->tp_as_sequence->sq_inplace_repeat)) { + if (HASINPLACE(v) && + v->ob_type->tp_as_sequence && + (g = v->ob_type->tp_as_sequence->sq_inplace_repeat) && + !(v->ob_type->tp_as_number && + v->ob_type->tp_as_number->nb_inplace_multiply)) + { long n; if (PyInt_Check(w)) { n = PyInt_AsLong(w); |