[ create a new paste ] login | about

Link: http://codepad.org/X9DqMKoc    [ raw code | output | fork ]

Python, pasted on Apr 25:
1
2
3
4
5
6
7
8
class C(object):
    def foo(self):
        pass

c = C()

print id(c.foo) == id(c.__class__.foo)
print c.foo is c.__class__.foo


Output:
1
2
True
False


Create a new paste based on this one


Comments: