Any way to get information from fun objects about their parameters?

Andrew Bennetts andrew-pythonlist at puzzling.org
Wed Mar 24 20:04:51 EST 2004


On Thu, Mar 25, 2004 at 12:49:57AM +0000, Kenneth McDonald wrote:
> For autodocumentation purposes, I'd like to be able to load a module
> and then find out the following information about functions and
> methods defined within it:
> 
> 1) Parameter names and order
> 2) Default value, if any, associated with each parameter
> 3) If the *param or **param conventions are used in the
> parameter list.

Look at the pydoc module in the standard library, which can do all this and
more.

-Andrew.





More information about the Python-list mailing list