mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -447,7 +447,8 @@ def isroutine(object):
|
|||
or isfunction(object)
|
||||
or ismethod(object)
|
||||
or ismethoddescriptor(object)
|
||||
or ismethodwrapper(object))
|
||||
or ismethodwrapper(object)
|
||||
or isinstance(object, functools._singledispatchmethod_get))
|
||||
|
||||
def isabstract(object):
|
||||
"""Return true if the object is an abstract base class (ABC)."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue