Mercurial > cpython-lru_cache-weakref
diff Objects/complexobject.c @ 23043:7fecd6d58f38 legacy-trunk
Deprecate % as well. The message for deprecation of //, % and divmod
is the same in all three cases (mostly because // calls divmod :-).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 15 Apr 2002 12:39:12 +0000 |
| parents | 454351ef50f1 |
| children | abe1bb76ee44 |
line wrap: on
line diff
--- a/Objects/complexobject.c Mon Apr 15 12:36:47 2002 +0000 +++ b/Objects/complexobject.c Mon Apr 15 12:39:12 2002 +0000 @@ -399,6 +399,11 @@ 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 @@ 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;
