Kaydet (Commit) 58cf7488 authored tarafından Oren Milman's avatar Oren Milman Kaydeden (comit) Serhiy Storchaka

bpo-31236: Improved some error messages of min() and max().

üst 84524454
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment