Class variable inheritance

HPJ henrypijames at gmail.com
Wed Sep 9 01:50:17 CEST 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