Visitar URL original
bpo-24037: Add Argument Clinic converter `bool(accept={int})`. by serhiy-storchaka · Pull Request #485 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use bool(accept={int}) in list.sort().
  • Loading branch information
serhiy-storchaka committed Mar 11, 2017
commit 140fc46cd6fcd442820fb174efa83b7caca980bb
4 changes: 2 additions & 2 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1968,14 +1968,14 @@ list.sort

*
key as keyfunc: object = None
reverse: int(c_default="0") = False
reverse: bool(accept={int}) = False

Stable sort *IN PLACE*.
[clinic start generated code]*/

static PyObject *
list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse)
/*[clinic end generated code: output=57b9f9c5e23fbe42 input=5029c13c9209d86a]*/
/*[clinic end generated code: output=57b9f9c5e23fbe42 input=b0fcf743982c5b90]*/
{
MergeState ms;
Py_ssize_t nremaining;
Expand Down