diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 88a4bf991d..7bb5687d9a 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1639,6 +1639,10 @@ min_max(PyObject *args, PyObject *kwds, int op) return NULL; } + if (keyfunc == Py_None) { + keyfunc = NULL; + } + maxitem = NULL; /* the result */ maxval = NULL; /* the value associated with the result */ while (( item = PyIter_Next(it) )) { |