fix inspect.get_func_args on PY2

This commit is contained in:
Prodesire 2017-11-14 08:42:39 +08:00
parent bb6b045a61
commit 6533079157
1 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,9 @@ if PY2:
def get_func_args(func):
argspec = inspect.getargspec(func)
return argspec.args[1:] # ignore 'self'
if inspect.ismethod(func):
return argspec[1:] # ignore 'self'
return argspec.args
def get_func_full_args(func):