mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
bpo-31236: Improved some error messages of min() and max().
This commit is contained in:
committed by
Serhiy Storchaka
parent
84524454d0
commit
58cf7488d5
@@ -1519,8 +1519,9 @@ min_max(PyObject *args, PyObject *kwds, int op)
|
||||
emptytuple = PyTuple_New(0);
|
||||
if (emptytuple == NULL)
|
||||
return NULL;
|
||||
ret = PyArg_ParseTupleAndKeywords(emptytuple, kwds, "|$OO", kwlist,
|
||||
&keyfunc, &defaultval);
|
||||
ret = PyArg_ParseTupleAndKeywords(emptytuple, kwds,
|
||||
(op == Py_LT) ? "|$OO:min" : "|$OO:max",
|
||||
kwlist, &keyfunc, &defaultval);
|
||||
Py_DECREF(emptytuple);
|
||||
if (!ret)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user