How send LIST to C extension?

Martin v. Löwis martin at
Wed Nov 26 06:53:13 CET 2003

seberino at (Christian Seberino) writes:

> Why would you extract elements of list/tuples with your
> way instead of PyArg_ParseTuple??

There are many reasons to do tuple access explicitly, and actually few
reasons to have PyArg_ParseTuple to do it for you.

You might want to do it explicitly if:
- you don't know the total number of elements in the tuple in advance.
- you are willing to accept not just tuples, but arbitrary sequences,
  for better polymorphism.


More information about the Python-list mailing list