[Tutor] Accessing the name of a Function
Kent Johnson
kent37 at tds.net
Wed Dec 13 11:54:56 CET 2006
Carroll, Barry wrote:
> Andreas:
>
> You're right, that is kind of messy and somewhat limited. In the
> present case, however, it is the function's defined name that I want, so
> this would work okay.
>
> I'm guessing that there is a way to determine the number and names of
> the arguments to the function as well. I'll go look at the sys module
> and see what I can find.
Look at the inspect module, specifically getargspec() and getargvalues().
Kent
More information about the Tutor
mailing list