object-oriented programming namespaces and object-orientation namespace is an abstraction that manages all of the identifiers that are defined in particular scopemapping each name to its associated value in pythonfunctionsclassesand modules are all first-class objectsand so the "valueassociated with an identifier in namespace may in fact be functionclassor module in section we explored python' use of namespaces to manage identifiers that are defined with global scopeversus those defined within the local scope of function call in this sectionwe discuss the important role of namespaces in python' management of object-orientation instance and class namespaces we begin by exploring what is known as the instance namespacewhich manages attributes specific to an individual object for exampleeach instance of our creditcard class maintains distinct balancea distinct account numbera distinct credit limitand so on (even though some instances may coincidentally have equivalent balancesor equivalent credit limitseach credit card will have dedicated instance namespace to manage such values there is separate class namespace for each class that has been defined this namespace is used to manage members that are to be shared by all instances of classor used without reference to any particular instance for examplethe make payment method of the creditcard class from section is not stored independently by each instance of that class that member function is stored within the namespace of the creditcard class based on our definition from code fragments and the creditcard class namespace includes the functionsinit get customerget bankget accountget balanceget limitchargeand make payment our predatorycreditcard class has its own namespaceconinit chargeand taining the three methods we defined for that subclassprocess month figure provides portrayal of three such namespacesa class namespace containing methods of the creditcard classanother class namespace with methods of the predatorycreditcard classand finally single instance namespace for sample instance of the predatorycreditcard class we note that there are two different definitions of function named chargeone in the creditcard classand then the overriding method in the predatorycreditcard class in similar fashionthere are two distinct init implementations howeverprocess month is name that is only defined within the scope of the predatorycreditcard class the instance namespace includes all data members for the instance (including the apr member that is established by the predatorycreditcard constructor