mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
inspect.signature: Add support for 'functools.partialmethod' #20223
This commit is contained in:
parent
eedf1c1ebf
commit
da5fe4f2da
3 changed files with 95 additions and 40 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue