in we learned that module namespaces have concrete implementation as dictionariesexposed with the built-in __dict__ attribute in and we learned that the same holds true for class and instance objects--attribute qualification is mostly dictionary indexing operation internallyand attribute inheritance is largely matter of searching linked dictionaries in factwithin pythoninstance and class objects are mostly just dictionaries with links between them python exposes these dictionariesas well as their linksfor use in advanced roles ( for coding toolswe put some of these tools to work in the prior but to summarize and help you better understand how attributes work internallylet' work through an interactive session that traces the way namespace dictionaries grow when classes are involved now that we know more about methods and superclasseswe can also embellish the coverage here for better look firstlet' define superclass and subclass with methods that will store data in their instancesclass superdef hello(self)self data 'spamclass sub(super)def hola(self)self data 'eggswhen we make an instance of the subclassthe instance starts out with an empty namespace dictionarybut it has links back to the class for the inheritance search to follow in factthe inheritance tree is explicitly available in special attributeswhich you can inspect instances have __class__ attribute that links to their classand classes have __bases__ attribute that is tuple containing links to higher superclasses ( ' running this on python your name formatsinternal attributesand key orders may vary) sub( __dict__ { __class__ sub __bases__ (,super __bases__ (,instance namespace dict class of instance superclasses of class (empty tuple in python as classes assign to self attributesthey populate the instance objects--that isattributes wind up in the instancesattribute namespace dictionariesnot in the classesan instance object' namespace records data that can vary from instance to instanceand self is hook into that namespacey sub( class coding details