Mercurial > cpython-lru_cache-weakref
diff Objects/floatobject.c @ 19673:b3271297b984 legacy-trunk
PEP 238 documented -Qwarn as warning only for classic int or long
division, and this makes sense. Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 04 Sep 2001 03:51:09 +0000 |
| parents | cf65ebf87560 |
| children | 715244108faa |
line wrap: on
line diff
--- a/Objects/floatobject.c Tue Sep 04 03:26:15 2001 +0000 +++ b/Objects/floatobject.c Tue Sep 04 03:51:09 2001 +0000 @@ -419,7 +419,7 @@ double a,b; CONVERT_TO_DOUBLE(v, a); CONVERT_TO_DOUBLE(w, b); - if (Py_DivisionWarningFlag && + if (Py_DivisionWarningFlag >= 2 && PyErr_Warn(PyExc_DeprecationWarning, "classic float division") < 0) return NULL; if (b == 0.0) {
