mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
Closes #13258: Use callable() built-in in the standard library.
This commit is contained in:
parent
f99e4b5dbe
commit
5d1155c08e
25 changed files with 48 additions and 51 deletions
|
@ -775,7 +775,7 @@ class HTMLDoc(Doc):
|
|||
push(msg)
|
||||
for name, kind, homecls, value in ok:
|
||||
base = self.docother(getattr(object, name), name, mod)
|
||||
if hasattr(value, '__call__') or inspect.isdatadescriptor(value):
|
||||
if callable(value) or inspect.isdatadescriptor(value):
|
||||
doc = getattr(value, "__doc__", None)
|
||||
else:
|
||||
doc = None
|
||||
|
@ -1199,7 +1199,7 @@ location listed above.
|
|||
hr.maybe()
|
||||
push(msg)
|
||||
for name, kind, homecls, value in ok:
|
||||
if hasattr(value, '__call__') or inspect.isdatadescriptor(value):
|
||||
if callable(value) or inspect.isdatadescriptor(value):
|
||||
doc = getdoc(value)
|
||||
else:
|
||||
doc = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue