[C++-sig] Check number of arguments of a function object ?

Marcus Jannes jannes80 at hotmail.de
Wed Feb 20 14:41:57 CET 2008

Hi again,

if i have a callable function object (PyObject*), how can i check the number of arguments this object has?
PyArg_ParseTuple does not seem to accomplish this.

def f(x): <- 1 argument
def f(x,y): <- 2 arguments

I want to make sure only functions with one argument get processed.

Windows Live Fotogalerie: So einfach organisieren Sie Ihre Fotos!

More information about the Cplusplus-sig mailing list