diff options
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r-- | Objects/complexobject.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 5c84eff..f0915dd 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -382,27 +382,6 @@ complex_div(PyComplexObject *v, PyComplexObject *w) } static PyObject * -complex_classic_div(PyComplexObject *v, PyComplexObject *w) -{ - Py_complex quot; - - if (Py_DivisionWarningFlag >= 2 && - PyErr_Warn(PyExc_DeprecationWarning, - "classic complex division") < 0) - return NULL; - - PyFPE_START_PROTECT("complex_classic_div", return 0) - errno = 0; - quot = c_quot(v->cval,w->cval); - PyFPE_END_PROTECT(quot) - if (errno == EDOM) { - PyErr_SetString(PyExc_ZeroDivisionError, "complex division"); - return NULL; - } - return PyComplex_FromCComplex(quot); -} - -static PyObject * complex_remainder(PyComplexObject *v, PyComplexObject *w) { Py_complex div, mod; @@ -948,7 +927,6 @@ static PyNumberMethods complex_as_number = { (binaryfunc)complex_add, /* nb_add */ (binaryfunc)complex_sub, /* nb_subtract */ (binaryfunc)complex_mul, /* nb_multiply */ - (binaryfunc)complex_classic_div, /* nb_divide */ (binaryfunc)complex_remainder, /* nb_remainder */ (binaryfunc)complex_divmod, /* nb_divmod */ (ternaryfunc)complex_pow, /* nb_power */ @@ -971,7 +949,6 @@ static PyNumberMethods complex_as_number = { 0, /* nb_inplace_add */ 0, /* nb_inplace_subtract */ 0, /* nb_inplace_multiply*/ - 0, /* nb_inplace_divide */ 0, /* nb_inplace_remainder */ 0, /* nb_inplace_power */ 0, /* nb_inplace_lshift */ |