def foo(a, b, c=5):
    return a + b + c

def show_defaults(f):
    args, varargs, varkw, defaults = inspect.getargspec(f)
if defaults:
    for arg, default in zip(args[-len(defaults):], defaults):
        print('{a} = {d}'.format(a=arg, d=default))
show_defaults(foo)
How to I determine the default value for a given function parameter at runtime?