From 1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 4 Sep 2001 03:51:09 +0000 Subject: 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. --- Objects/floatobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/floatobject.c') diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 8cd26b41dc..478e13174f 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) { -- cgit v1.2.1