How to use ParseTuple with unknown number of args?

Daniel Dittmar daniel.dittmar at sap.corp
Tue Jul 18 06:44:29 EDT 2006


ondekoza wrote:
> The earlier posts generally highlight some specific feature of calling
> with arrays. Can someone point me to a piece of software, where sth.
> like this is actually used?

Python source/Objects/stringobject.c string_join would be an example if 
you only allow a list or tuple.

Python/bltinmodule.c min_max demonstrates how to allow either a sequence 
or a variable number of arguments.

Modules/itertools.c has probably lots of examples on how to work with 
iterators at the C API level.

Daniel




More information about the Python-list mailing list