inspect.signature: Add support for 'functools.partialmethod' #20223

This commit is contained in:
Yury Selivanov 2014-01-27 17:28:37 -05:00
parent eedf1c1ebf
commit da5fe4f2da
3 changed files with 95 additions and 40 deletions

View file

@ -290,6 +290,7 @@ class partialmethod(object):
call_args = (cls_or_self,) + self.args + tuple(rest)
return self.func(*call_args, **call_keywords)
_method.__isabstractmethod__ = self.__isabstractmethod__
_method._partialmethod = self
return _method
def __get__(self, obj, cls):