mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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.
This commit is contained in:
parent
61c345fa37
commit
1832de4bc0
4 changed files with 11 additions and 7 deletions
|
@ -377,7 +377,7 @@ complex_classic_div(PyComplexObject *v, PyComplexObject *w)
|
|||
{
|
||||
Py_complex quot;
|
||||
|
||||
if (Py_DivisionWarningFlag &&
|
||||
if (Py_DivisionWarningFlag >= 2 &&
|
||||
PyErr_Warn(PyExc_DeprecationWarning,
|
||||
"classic complex division") < 0)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue