The reload () function loads the previously imported modules once again. Reloading (reload) includes the analysis process and initialization process that was applied when the module was originally imported. This allows the changed Python module to be reloaded without exiting the interpreter.
A number of points to note:
1. If the module is syntactically correct, but fails during initialization, the import process does not correctly bind the module's name to the symbol table. At this point, the module must be loaded with the import () function before the module can be reloaded.
2. Reloading the module does not delete the original old version of the module in the symbol table of the registration entries.
3. If a module takes advantage of the From ... Import ... Way to import objects from another module, the reload () function does not redefine the imported objects, you can take advantage of the import ... form to avoid this problem.
4. The Reload module that provides the class does not affect any of the saved instances of the provided class---the saved instance will continue to use the original method definition, only the new instance of the class uses the new format. This principle also applies to derived classes.
Python's reload function