C API q
Alex Martelli
aleaxit at yahoo.com
Fri Oct 29 10:16:42 EDT 2004
Emanuel Landeholm <emanuel.landeholm at telia.com> wrote:
...
> > You can call the 'remove' method on the list object from C just as you
> > could from Python, essentially. Internally, that does essentially the
> > same thing you're doing here, but it does make your own code simpler.
>
> Okay, how do I do that?
Any of several ways, such as:
PyObject_CallMethod(oblist, "remove", "O", obitem)
Alex
More information about the Python-list
mailing list