8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 374909e commit 7b42cb8Copy full SHA for 7b42cb8
Objects/listobject.c
@@ -816,13 +816,10 @@ static PyObject *
816
list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object)
817
/*[clinic end generated code: output=7f35e32f60c8cb78 input=b1987ca998a4ae2d]*/
818
{
819
- PyObject *ret = Py_None;
820
- Py_BEGIN_CRITICAL_SECTION(self);
821
- if (ins1(self, index, object) < 0) {
822 6C3E
- ret = NULL;
+ if (ins1(self, index, object) == 0) {
+ Py_RETURN_NONE;
823
}
824
- Py_END_CRITICAL_SECTION();
825
- return ret;
822
+ return NULL;
826
827
828
/*[clinic input]
0 commit comments