]> granicus.if.org Git - python/commitdiff
Make error message more specific for min() and max().
authorRaymond Hettinger <python@rcn.com>
Sun, 29 Dec 2002 18:31:19 +0000 (18:31 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 29 Dec 2002 18:31:19 +0000 (18:31 +0000)
Suggested by MvL.

Python/bltinmodule.c

index 5cf1d413ae90aaf5e771bbd3352dee09b7be6ddb..ad0625016f2be019e99f7837c9e16e09d12b56cc 100644 (file)
@@ -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);