how to check if a function signature "matches" without calling the function?

Mike McCandless mikemccand at
Tue Sep 24 17:05:33 EDT 2002

Does Python 2.2.1 make it possible for me to see some details about
the expected arguments that a function takes, without actually calling
the function?

Specifically, if I have a function or method object, and I have a
tuple + dict of arguments I'd like to apply it on, is there a function
I can call that would check if the tuple + dict can be properly
"coerced" to the formal parameters?

Browsing through the Python source it looks like this capability is
not cleanly factored out of the "ext_do_call" function in



More information about the Python-list mailing list