simply evaluates from left to rightfetching attributes from objects along the way note that mod can say import mod and then mod mod xbut it cannot say import mod mod --this syntax invokes something called package (directoryimportsdescribed in the next package imports also create module namespace nestingbut their import statements are taken to reflect directory treesnot simple file import chains reloading modules as we've seena module' code is run only once per process by default to force module' code to be reloaded and rerunyou need to ask python to do so explicitly by calling the reload built-in function in this sectionwe'll explore how to use reloads to make your systems more dynamic in nutshellimports (via both import and from statementsload and run module' code only the first time the module is imported in process later imports use the already loaded module object without reloading or rerunning the file' code the reload function forces an already loaded module' code to be reloaded and rerun assignments in the file' new code change the existing module object in place why care about reloading modulesin shortdynamic customizationthe reload function allows parts of program to be changed without stopping the whole program with reloadthe effects of changes in components can be observed immediately reloading doesn' help in every situationbut where it doesit makes for much shorter development cycle for instanceimagine database program that must connect to server on startupbecause program changes or customizations can be tested immediately after reloadsyou need to connect only once while debugging long-running servers can update themselves this waytoo because python is interpreted (more or less)it already gets rid of the compile/link steps you need to go through to get program to runmodules are loaded dynamically when imported by running program reloading offers further performance advantage by allowing you to also change parts of running programs without stopping though beyond this book' scopenote that reload currently only works on modules written in pythoncompiled extension modules coded in language such as can be dynamically loaded at runtimetoobut they can' be reloaded (though most users probably prefer to code customizations in python anyhow! module coding basics