and __bases__ sequence that provides access to superclasses we can use these here to print the name of the class from which an instance is made rather than one we've hardcoded the built-in object __dict__ attribute provides dictionary with one key/value pair for every attribute attached to namespace object (including modulesclassesand instancesbecause it is dictionarywe can fetch its keys listindex by keyiterate over its keysand so onto process all attributes generically we can use this here to print every attribute in any instancenot just those we hardcode in custom displaysmuch as we did in ' module tools we met the first of these categories in the prior but here' quick review at python' interactive prompt with the latest versions of our person py classes notice how we load person at the interactive prompt with from statement here--class names live in and are imported from modulesexactly like function names and other variablesfrom person import person bob person('bob smith'bob [personbob smith print(bob[personbob smith show bob' __repr__ (not __str__dittoprint =__str__ or __repr__ bob __class__ bob __class__ __name__ 'personshow bob' class and its name list(bob __dict__ keys()['pay''job''name'attributes are really dict keys use list to force list in for key in bob __dict__print(key'=>'bob __dict__[key]index manually pay = job =none name =bob smith for key in bob __dict__print(key'=>'getattr(bobkey)obj attrbut attr is var pay = job =none name =bob smith as noted briefly in the prior some attributes accessible from an instance might not be stored in the __dict__ dictionary if the instance' class defines __slots__an optional and relatively obscure feature of new-style classes (and hence all classes in python xthat stores attributes sequentially in the instancemay preclude an instance __dict__ altogetherand which we won' study in full until and since slots really belong to classes instead of instancesand since they are rarely step using introspection tools