eightHundreds
2/11/2017 - 5:37 AM

获得函数的默认参数

获得函数的默认参数

import inspect
a = inspect.getargspec(eat_dog)
zip(a.args[-len(a.defaults):],a.defaults)