introspection and functions

Wildemar Wildenburger wildemar at freakmail.de
Wed Aug 22 18:13:56 EDT 2007


yagyala wrote:
> Hi. I would like to be able to tell, at run time, how many parameters
> a function requires. Ideally I would like to be able to tell which are
> optional as well. I've tried looking at the functions attributes, but
> haven't found one that helps in this. How can I do this?
>   
I've never used it before, but there is the "inspect" module. 
<url:http://docs.python.org/lib/module-inspect.html>.
That any good?

/W



More information about the Python-list mailing list