mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue 2354: Fix-up compare warning. Patch contributed by Jeff Balogh.
This commit is contained in:
parent
977eb021f3
commit
05387861ea
2 changed files with 15 additions and 1 deletions
|
|
@ -2037,7 +2037,7 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds)
|
|||
}
|
||||
if (compare == Py_None)
|
||||
compare = NULL;
|
||||
if (compare == NULL &&
|
||||
if (compare != NULL &&
|
||||
Py_Py3kWarningFlag &&
|
||||
PyErr_Warn(PyExc_DeprecationWarning,
|
||||
"In 3.x, the cmp argument is no longer supported.") < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue