summaryrefslogtreecommitdiffstats
path: root/Objects/complexobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-04-15 12:39:12 (GMT)
committerGuido van Rossum <guido@python.org>2002-04-15 12:39:12 (GMT)
commit69cf3c7641a7c4a76e0e66e3367f949d14d7d6c4 (patch)
tree09ce8969b516e4f3caeaaa5474babe43f12cbd59 /Objects/complexobject.c
parent862fe3c52e3ef8d4ebe81d473b112cb25b15329a (diff)
downloadcpython-69cf3c7641a7c4a76e0e66e3367f949d14d7d6c4.zip
cpython-69cf3c7641a7c4a76e0e66e3367f949d14d7d6c4.tar.gz
cpython-69cf3c7641a7c4a76e0e66e3367f949d14d7d6c4.tar.bz2
Deprecate % as well. The message for deprecation of //, % and divmod
is the same in all three cases (mostly because // calls divmod :-).
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r--Objects/complexobject.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 3c26b5b2..adcf85a 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -399,6 +399,11 @@ static PyObject *
complex_remainder(PyComplexObject *v, PyComplexObject *w)
{
Py_complex div, mod;
+
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "complex divmod(), // and % are deprecated") < 0)
+ return NULL;
+
errno = 0;
div = c_quot(v->cval,w->cval); /* The raw divisor value. */
if (errno == EDOM) {
@@ -420,7 +425,7 @@ complex_divmod(PyComplexObject *v, PyComplexObject *w)
PyObject *d, *m, *z;
if (PyErr_Warn(PyExc_DeprecationWarning,
- "complex divmod() and // are deprecated") < 0)
+ "complex divmod(), // and % are deprecated") < 0)
return NULL;
errno = 0;