now that we've examined class and instance objectsthe python namespace story is complete for referencei'll quickly summarize all the rules used to resolve names here the first things you need to remember are that qualified and unqualified names are treated differentlyand that some scopes serve to initialize object namespacesunqualified names ( xdeal with scopes qualified attribute names ( object xuse object namespaces some scopes initialize object namespaces (for modules and classesthese concepts sometimes interact--in object xfor exampleobject is looked up per scopesand then is looked up in the result objects since scopes and namespaces are essential to understanding python codelet' summarize the rules in more detail simple namesglobal unless assigned as we've learnedunqualified simple names follow the legb lexical scoping rule outlined when we explored functions in assignment ( valuemakes names local by defaultcreates or changes the name in the current local scopeunless declared global (or nonlocal in xreference (xlooks for the name in the current local scopethen any and all enclosing functionsthen the current global scopethen the built-in scopeper the legb rule enclosing classes are not searchedclass names are fetched as object attributes instead also per some special-case constructs localize names further ( variables in some comprehensions and try statement clauses)but the vast majority of names follow the legb rule attribute namesobject namespaces we've also seen that qualified attribute names refer to attributes of specific objects and obey the rules for modules and classes for class and instance objectsthe reference rules are augmented to include the inheritance search procedureassignment (object valuecreates or alters the attribute name in the namespace of the object being qualifiedand none other inheritance-tree climbing happens only on attribute referencenot on attribute assignment class coding details