Commit 9ec4c78a authored by Guido van Rossum's avatar Guido van Rossum

SF bug #543387.

Complex numbers implement divmod() and //, neither of which makes one
lick of sense.  Unfortunately this is documented, so I'm adding a
deprecation warning now, so we can delete this silliness, oh, around
2005 or so.

Bugfix candidate (At least for 2.2.2, I think.)
parent a3a4300f
...@@ -418,6 +418,11 @@ complex_divmod(PyComplexObject *v, PyComplexObject *w) ...@@ -418,6 +418,11 @@ complex_divmod(PyComplexObject *v, PyComplexObject *w)
{ {
Py_complex div, mod; Py_complex div, mod;
PyObject *d, *m, *z; PyObject *d, *m, *z;
if (PyErr_Warn(PyExc_DeprecationWarning,
"complex divmod() and // are deprecated") < 0)
return NULL;
errno = 0; errno = 0;
div = c_quot(v->cval,w->cval); /* The raw divisor value. */ div = c_quot(v->cval,w->cval); /* The raw divisor value. */
if (errno == EDOM) { if (errno == EDOM) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment