names using from that isthe client' names will still reference the original objects fetched with fromeven if the names in the original module are later resetfrom module import from imp import reload reload(modulex may not reflect any module reloadschanges modulebut not my names still references old object to make reloads more effectiveuse import and name qualification instead of from because qualifications always go back to the modulethey will find the new bindings of module names after reloading has updated the module' content in placeimport module from imp import reload reload(modulemodule get modulenot names changes module in place get current xreflects module reloads as related consequenceour transitive reloader earlier in this doesn' apply to names fetched with fromonly importagainif you're going to use reloadsyou're probably better off with import reloadfromand interactive testing in factthe prior gotcha is even more subtle than it appears warned that it' usually better not to launch programs with imports and reloads because of the complexities involved things get even worse when from is brought into the mix python beginners most often stumble onto its issues in scenarios like this--imagine that after opening module file in text edit windowyou launch an interactive session to load and test your module with fromfrom module import function function( finding bugyou jump back to the edit windowmake changeand try to reload the module this wayfrom imp import reload reload(modulethis doesn' workbecause the from statement assigned only the name functionnot module to refer to the module in reloadyou have to first bind its name with an import statement at least oncefrom imp import reload import module reload(modulefunction( howeverthis doesn' quite work either--reload updates the module object in placebut as discussed in the preceding sectionnames like function that were copied out of advanced module topics