question about scope
John Salerno
johnjsal at NOSPAMgmail.com
Sun Oct 1 12:48:14 EDT 2006
James Stroud wrote:
> This is because that list is an attribute of the class. Instances have a
> reference of this class attribute, but it can be replaced by an
> attribute of the instance with self (self is a reference to the instance
> and not the class. This example might help:
Ah, I see! So within my create_menubar() method, would it better to
refer to menu_items as DataAccessFrame.menu_items? Or does it not matter
in this case, since I'm not reassigning it per instance?
More information about the Python-list
mailing list