Class variable inheritance

HPJ henrypijames at gmail.com
Tue Sep 8 19:50:17 EDT 2009


> would you expect the B class to have a copy of the foo method?

Sorta. I would expect B to have a copy of the "foo" attribute, which
then refers to the same method as A.foo. So the method itself will be
be copied, but its address stored separately in A.foo and B.foo.



More information about the Python-list mailing list