question about scope
John Salerno
johnjsal at NOSPAMgmail.com
Sun Oct 1 01:30:32 EDT 2006
Steve Holden wrote:
> The methods do indeed look in their enclosing class, but only for
> self-relative references. These are sought first in the instance, then
> in the instance's class, then in the instance's class's superclass, and
> so on up to the ultimate superclass. In other words, all attribute
> lookup uses the method resolution order ...
So what I did is correct? It does work, but why don't I have to define
the list as self.menu_items as well?
More information about the Python-list
mailing list