Message178964
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. |
|
Date |
User |
Action |
Args |
2013-01-03 16:41:29 | wdanilo | set | recipients:
+ wdanilo |
2013-01-03 16:41:29 | wdanilo | set | messageid: <1357231289.77.0.0608728593688.issue16851@psf.upfronthosting.co.za> |
2013-01-03 16:41:29 | wdanilo | link | issue16851 messages |
2013-01-03 16:41:29 | wdanilo | create | |
|