> When I create an instance of a class, > are the class's functions *copied* to create the methods? > Or are method calls actually calls of the class's functions? > > I am sure this is both obvious and FAQ, > but I did not find a clear answer
The best way to find out is to try it: ####################################### class Foo(object): def hello(self): return "Foo::hello" f1 = Foo() print f1.hello() Foo.hello = lambda self: "new hello!" print f1.hello() ####################################### From what I see of this evidence, "method calls [are] actually calls of the class's functions", not copied. -tkc -- http://mail.python.org/mailman/listinfo/python-list