Bugfix for issue #6. Thanks DaRasch!

This commit is contained in:
Erez Shinan 2017-05-06 18:00:51 +03:00
parent 5946e78ed2
commit e20b54be2f
1 changed files with 8 additions and 2 deletions

View File

@ -63,11 +63,17 @@ def inline_args(f):
def _f_builtin(_self, args):
return f(*args)
return _f_builtin
else:
@functools.wraps(f)
elif isinstance(f, types.MethodType):
@functools.wraps(f.__func__)
def _f(self, args):
return f.__func__(self, *args)
return _f
else:
@functools.wraps(f.__call__.__func__)
def _f(self, args):
return f.__call__.__func__(self, *args)
return _f
try: