mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
gh-127750: Restore inspect and pydoc support of singledispatchmethod (GH-130309)
The code is still flawed, because it does not recognize class and static methods, and the first argument is not removed from the signature of bound methods, but at least it does not worse than in 3.13 and older.
This commit is contained in:
parent
ed831b95a2
commit
10b32054ad
4 changed files with 79 additions and 1 deletions
|
@ -1075,6 +1075,10 @@ class _singledispatchmethod_get:
|
|||
raise AttributeError
|
||||
return getattr(self._unbound.func, name)
|
||||
|
||||
@property
|
||||
def __wrapped__(self):
|
||||
return self._unbound.func
|
||||
|
||||
@property
|
||||
def register(self):
|
||||
return self._unbound.register
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue