from assignments do with referencesflip back to figure - (function argument passing)and mentally replace "callerand "functionwith "importedand "importer the effect is the sameexcept that here we're dealing with names in modulesnot functions assignment works the same everywhere in python cross-file name changes recall from the preceding example that the assignment to in the interactive session changed the name in that scope onlynot the in the file--there is no link from name copied with from back to the file it came from to really change global name in another fileyou must use importpython from small import xy copy two names out changes my only import small small get module name changes in other module this phenomenon was introduced in because changing variables in other modules like this is common source of confusion (and often bad design choice)we'll revisit this technique again later in this part of the book note that the change to [ in the prior session is differentit changes an objectnot nameand the name in both modules references the samechanged object import and from equivalence notice in the prior example that we have to execute an import statement after the from to access the small module name at all from only copies names from one module to anotherit does not assign the module name itself at least conceptuallya from statement like this onefrom module import name name copy these two names out (onlyis equivalent to this statement sequenceimport module name module name name module name del module fetch the module object copy names out by assignment get rid of the module name like all assignmentsthe from statement creates new variables in the importerwhich initially refer to objects of the same names in the imported file only the names are copied outthoughnot the objects they referenceand not the name of the module itself when we use the from form of this statement (from module import *)the equivalence is the samebut all the top-level names in the module are copied over to the importing scope this way module coding basics