argument list

John Roth newsgroups at jhrothjr.com
Sun Dec 28 17:23:13 EST 2003


"Phil Hornby" <phil.hornby at accutest.co.uk> wrote in message
news:mailman.146.1072646016.684.python-list at python.org...
> Dear Python List,
>
> I am working on a solution embedding Python in an app that will looks for
> specific string combination within the function names to determine if a
> handler for an event exists; I have been able to extract the function
names
> and find all of the 'fields' of interest. What I am concerned about,
> however, is that they could have the wrong argument profile, as specific
> handlers will have specific function arguments - can I find out what
> arguments a specific functions takes from the C-API? As I don't seem to be
> able to find anything...but I could be just being blind...

Look at the inspect module. That's the best you can do;
exact type information simply isn't availible.

The times I've actually needed this I've simply built a metadata
dictionary into the affected classes using a fixed name. So far,
I've only needed it twice, so I don't have a real good feel for the
"best" structure for such a facility.

John Roth
>
> Thanks...
>
> --
> Phil Hornby
>
>






More information about the Python-list mailing list