Diez B. Roggisch wrote:
John wrote:

... hmm... bound methods get created each time you make
a call to an instance method via an instance of the given class?


No, they get created when you create an actual instance of an object. So
only at construction time. Creating them means taking the unbound method
and binding the created object as first argument to the method. Thus each
instance of a class Foo with a method bar has its own instance of bar - the
bound method bar. But only one per object.




Ohhhhhhhh. Unlike C++, where methods are not first class objects and you only have *one* that gets shared by all instances.

I'm getting it. Thanks for the reply. :)

---J

--
--- remove zees if replying via email ---
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to