Author wdanilo
Recipients wdanilo
Date 2013-01-03.16:41:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357231289.77.0.0608728593688.issue16851@psf.upfronthosting.co.za>
In-reply-to
Content
Hi! I think this behaviour is bug. Lets concider the following code:

import inspect
class X(object):
    def a(self):pass
    def b(self):pass
    def c(self):pass

print(inspect.getmembers(X, predicate=inspect.ismethod))
print(inspect.getmembers(X, predicate=inspect.isfunction))

In python 2.7, the results are:
[('a', <unbound method X.a>), ('b', <unbound method X.b>), ('c', <unbound method X.c>)]
[]

and in Python 3.2:
[]
[('a', <function a at 0x1b0fd10>), ('b', <function b at 0x1b0fe20>), ('c', <function c at 0x1b160d8>)]

I think, the results from python 2.7 are correct.
History
Date User Action Args
2013-01-03 16:41:29wdanilosetrecipients: + wdanilo
2013-01-03 16:41:29wdanilosetmessageid: <1357231289.77.0.0608728593688.issue16851@psf.upfronthosting.co.za>
2013-01-03 16:41:29wdanilolinkissue16851 messages
2013-01-03 16:41:29wdanilocreate