Ravi Jain <aivainjr...@gmail.com> added the comment:

but `callable` returns `True` for classes with `__call__` also, it does not 
check whether the argument passed to it is a function or not.

I want some way to return `True` for both builtin functions and Python 
functions, but not for classes.

And similarly, some way to return `True` for both builtin methods and Python 
methods.

Should the documentation for `inspect.isfunction` include, `this does not 
include builtin functions.`, and similarly for `inspect.ismethod`?

Should I create a PR to add these two sentences to the documentation?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47214>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to