before we move onremember that there' nothing magic about class name it' just variable assigned to an object when the class statement runsand the object can be referenced with any normal expression for instanceif our firstclass were coded in module file instead of being typed interactivelywe could import it and use its name normally in class header linefrom modulename import firstclass class secondclass(firstclass)def display(self)copy name into my scope use class name directly orequivalentlyimport modulename class secondclass(modulename firstclass)def display(self)access the whole module qualify to reference like everything elseclass names always live within moduleso they must follow all the rules we studied in part for examplemore than one class can be coded in single module file--like other statements in moduleclass statements are run during imports to define namesand these names become distinct module attributes more generallyeach module may arbitrarily mix any number of variablesfunctionsand classesand all names in module behave the same way the file food py demonstratesfood py var def func()class spamclass hamclass eggsfood var food func food spam food ham food eggs this holds true even if the module and class happen to have the same name for examplegiven the following fileperson pyclass personwe need to go through the module to fetch the class as usualimport person person person(import module class within module although this path may look redundantit' requiredperson person refers to the per son class inside the person module saying just person gets the modulenot the classunless the from statement is usedfrom person import person person(get class from module use class name as with any other variablewe can never see class in file without first importing and somehow fetching it from its enclosing file if this seems confusingdon' use the same name for module and class within it in factcommon convention in python dictates that class names should begin with an uppercase letterto help make them more distinct class coding basics