Dynamically pass a function arguments from a dict

Nick Coghlan ncoghlan at iinet.net.au
Thu Feb 24 05:11:18 EST 2005


Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Running startup script
Py> import inspect
Py> help(inspect.getargspec)
Help on function getargspec in module inspect:

getargspec(func)
     Get the names and default values of a function's arguments.

     A tuple of four things is returned: (args, varargs, varkw, defaults).
     'args' is a list of the argument names (it may contain nested lists).
     'varargs' and 'varkw' are the names of the * and ** arguments or None.
     'defaults' is an n-tuple of the default values of the last n arguments.


Don't-forget-the-std-lib'ly,
Nick.

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net



More information about the Python-list mailing list