mirror of
https://github.com/python/cpython.git
synced 2024-11-25 02:44:06 +08:00
Make error message more specific for min() and max().
Suggested by MvL.
This commit is contained in:
parent
c7b076928c
commit
bbfb910416
@ -1051,7 +1051,7 @@ min_max(PyObject *args, int op)
|
||||
|
||||
if (PyTuple_Size(args) > 1)
|
||||
v = args;
|
||||
else if (!PyArg_UnpackTuple(args, "min/max", 1, 1, &v))
|
||||
else if (!PyArg_UnpackTuple(args, (op==Py_LT) ? "min" : "max", 1, 1, &v))
|
||||
return NULL;
|
||||
|
||||
it = PyObject_GetIter(v);
|
||||
|
Loading…
Reference in New Issue
Block a user