diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/complexobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index a8419e3..a2ccadb 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -538,6 +538,11 @@ complex_coerce(PyObject **pv, PyObject **pw) Py_INCREF(*pv); return 0; } + else if (PyComplex_Check(*pw)) { + Py_INCREF(*pv); + Py_INCREF(*pw); + return 0; + } return 1; /* Can't do it */ } |