Ezio Melotti added the comment: I think that's expected and by design. In Python 3 there are no unbound methods, but simply functions: >>> class X: ... def add(a, b): return a+b ... >>> add = X.add >>> add <function add at 0xb740d26c> >>> add(3, 4) 7 >>> def add(a, b): return a+b ... >>> add <function add at 0xb740d22c> >>> add(3, 4) 7
As you can see there's no real difference between the two "add". It's different though with bound methods (obtained from an instance rather than a class): >>> add = X().add >>> add <bound method X.add of <__main__.X object at 0xb740e0ec>> The documentation is also clear that ismethod() "Return true if the object is a bound method written in Python.". Maybe an additional note can be added to state that "unbound methods" are not included, and that are instead recognized by isfunction(). ---------- assignee: -> docs@python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs@python, ezio.melotti stage: -> needs patch type: behavior -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16851> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com