STINNER Victor <vstin...@python.org> added the comment:
I proposed to Hai Shi in his PR to add PyList_Remove() since I was surprised that the feature is exposed in Python but not at the C level. > You always can use PyObject_CallMethod(). It is not a method called in tight > loop for which the overhead of calling method is significant. He reimplemented the function by copying items into a new list except of the item which should be removed. I expect that PyList_SetSlice() is more efficient than creating a new list, it modifies the list in-place. I'm fine with rejecting this issue. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41871> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com