When I try to get the id of a bound method from the shell I get different ids. I would expect to see id(c.myFunc) returning the same value every time. Could someone please explain why id(c.myFunc) is changing?
>>> class MyClass(object):
... def myFunc():
... pass
...
>>> c = MyClass()
>>> c.myFunc
<bound method MyClass.myFunc of <__main__.MyClass object at 0x0000000031CFD7B8>>
>>> id(c.myFunc)
837301736L
>>> id(c.myFunc)
833022784L
>>> id(c.myFunc)
837301520L