runtime-info about a function-object

Andreas Leitgeb Andreas.Leitgeb at
Mon Aug 19 20:39:39 CEST 2002

Michael Hudson <mwh at> wrote:
> Andreas.Leitgeb at (Andreas Leitgeb) writes:
>> >>> def f(x,y,z=someobj,*arg,**dict): pass
>> Is it possible to request info about function-object "f",
>>  especially about the number/name/defaults of arguments
>>  that f accepts ?

> Yes, the inspect module can do this.  I suggest you read it's
> documentation (see

Thanks a lot !
 ... especially getargspec(f) pleased me :-)

Thanks also to Mark McEahern, for pointing out  f.func_code.*,
  the primary source of information.

Newsflash: Sproingy made it to the ground !
  read more ... <>

More information about the Python-list mailing list