Code: Select all
>>> class a():
... def x(self):
... pass
...
>>> x=a()
>>> x.x
<bound_method>
>>> x.x==x.x
False
Code: Select all
>>> x.x
<bound_method 7f2fd0491e20 <a object at 7f2fd0491c80>.<function x at 0x7f2fd0491a80>>
In normal python the output is:
Code: Select all
>>> class a():
... def x(self):
... pass
...
>>> x=a()
>>> x.x
<bound method a.x of <__main__.a instance at 0x7f7374d37550>>
>>> x.x == x.x
True