mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
merge from trunk
This commit is contained in:
parent
2d8dcdcb06
commit
f10a79aad4
40 changed files with 621 additions and 305 deletions
|
@ -82,7 +82,7 @@ insort_right(PyObject *self, PyObject *args, PyObject *kw)
|
|||
index = internal_bisect_right(list, item, lo, hi);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
if (PyList_Check(list)) {
|
||||
if (PyList_CheckExact(list)) {
|
||||
if (PyList_Insert(list, index, item) < 0)
|
||||
return NULL;
|
||||
} else {
|
||||
|
@ -183,7 +183,7 @@ insort_left(PyObject *self, PyObject *args, PyObject *kw)
|
|||
index = internal_bisect_left(list, item, lo, hi);
|
||||
if (index < 0)
|
||||
return NULL;
|
||||
if (PyList_Check(list)) {
|
||||
if (PyList_CheckExact(list)) {
|
||||
if (PyList_Insert(list, index, item) < 0)
|
||||
return NULL;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue