diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-30 20:15:17 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-30 20:15:17 (GMT) |
commit | 70b64fce96e894dfa8af5afd1f8b3fe863ba16e0 (patch) | |
tree | 15d549753edea1f11c0a3990ea0419426220c445 /Python/bltinmodule.c | |
parent | 4f066126d616d35aa8c0911a915ad64a09aaf16e (diff) | |
download | cpython-70b64fce96e894dfa8af5afd1f8b3fe863ba16e0.zip cpython-70b64fce96e894dfa8af5afd1f8b3fe863ba16e0.tar.gz cpython-70b64fce96e894dfa8af5afd1f8b3fe863ba16e0.tar.bz2 |
Issue #1771: Remove cmp parameter from list.sort() and builtin.sorted().
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 05f6a81..b86e3fb 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1494,14 +1494,14 @@ Precision may be negative."); static PyObject * builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds) { - PyObject *newlist, *v, *seq, *compare=NULL, *keyfunc=NULL, *newargs; + PyObject *newlist, *v, *seq, *keyfunc=NULL, *newargs; PyObject *callable; - static char *kwlist[] = {"iterable", "cmp", "key", "reverse", 0}; + static char *kwlist[] = {"iterable", "key", "reverse", 0}; int reverse; - /* args 1-4 should match listsort in Objects/listobject.c */ - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOi:sorted", - kwlist, &seq, &compare, &keyfunc, &reverse)) + /* args 1-3 should match listsort in Objects/listobject.c */ + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|Oi:sorted", + kwlist, &seq, &keyfunc, &reverse)) return NULL; newlist = PySequence_List(seq); @@ -1533,7 +1533,7 @@ builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds) } PyDoc_STRVAR(sorted_doc, -"sorted(iterable, cmp=None, key=None, reverse=False) --> new sorted list"); +"sorted(iterable, key=None, reverse=False) --> new sorted list"); static PyObject * builtin_vars(PyObject *self, PyObject *args) |