[issue16851] Hint about correct ismethod and isfunction usage
Thomas Kluyver
report at bugs.python.org
Mon Mar 4 13:36:21 CET 2013
Thomas Kluyver added the comment:
I agree that the docs for inspect.ismethod() for Python 2 are wrong.
The docs say: "Return true if the object is a bound method written in Python."
However, it also returns True for an unbound method:
>>> class A:
... def meth(self):
... pass
...
>>> A.meth
<unbound method A.meth>
>>> import inspect
>>> inspect.ismethod(A.meth)
True
----------
nosy: +takluyver
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16851>
_______________________________________
More information about the Python-bugs-list
mailing list