Referencing a container object's attributes
Tim Churches
tchur at optushome.com.au
Sat Mar 24 21:15:19 EST 2001
Is there any way for a method of a class instance which is embedded in a
container class instance to look up attributes of that container class
instance (i.e. the one which contains it)? At the moment I am putting
the name of the container instance in an attribute of the containee (at
the time when the containee is instantiated). Is there a neater way? All
the Python texts cover referencing an object's superclass(es), but not
its container object(s).
Tim C
More information about the Python-list
mailing list