C API missing PyList_Remove() ...

meowbot at meowing.net meowbot at meowing.net
Fri Jun 15 16:10:20 EDT 2001

Darran Edmundson wrote:
>Why has the C equivalent of "list.remove(item)" been
>left out of the list of exported functions?  Checking the
>source, listobject.h exports PyList_Append().  Hovever
>listobject.c has no function PyList_Remove(), instead just
>the unexported list_remove() function.  This is obviously
>"by design", but why?

Why not?

PySequence_Index() and PySequence_DelItem() are probably what you're
looking for.

More information about the Python-list mailing list