diff options
author | Guido van Rossum <guido@python.org> | 2001-09-04 03:51:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-04 03:51:09 (GMT) |
commit | 1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2 (patch) | |
tree | 2d41b60cbaa6176a1b889a7d15d1f11449c1ddaa /Objects/floatobject.c | |
parent | 61c345fa37573005b708d239c0911218ca22383c (diff) | |
download | cpython-1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2.zip cpython-1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2.tar.gz cpython-1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2.tar.bz2 |
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.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r-- | Objects/floatobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 8cd26b4..478e131 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -419,7 +419,7 @@ float_classic_div(PyObject *v, PyObject *w) 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) { |