[Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.91,2.92
Guido van Rossum
gvanrossum@users.sourceforge.net
Mon, 03 Sep 2001 20:50:27 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv8440
Modified Files:
floatobject.c
Log Message:
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.
Index: floatobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
retrieving revision 2.91
retrieving revision 2.92
diff -C2 -d -r2.91 -r2.92
*** floatobject.c 2001/09/03 08:35:41 2.91
--- floatobject.c 2001/09/04 03:50:25 2.92
***************
*** 420,424 ****
CONVERT_TO_DOUBLE(v, a);
CONVERT_TO_DOUBLE(w, b);
! if (Py_DivisionWarningFlag &&
PyErr_Warn(PyExc_DeprecationWarning, "classic float division") < 0)
return NULL;
--- 420,424 ----
CONVERT_TO_DOUBLE(v, a);
CONVERT_TO_DOUBLE(w, b);
! if (Py_DivisionWarningFlag >= 2 &&
PyErr_Warn(PyExc_DeprecationWarning, "classic float division") < 0)
return NULL;