December 2000
Intermediate to advanced
816 pages
16h 57m
English
Importing a module requires the use of the import statement, whose syntax is:
import module1[, module2[, … moduleN]]
When this statement is encountered by the interpreter, the module is imported if found in the search path. Scoping rules apply, so if imported from the top-level of a module, it has global scope; if imported from a function, it has local scope.
When a module is imported the first time, it is loaded and executed.
One effect of loading a module is that the imported module is “executed,” that is, the top-level portion of the imported module is directly executed. This usually includes setting up of global variables as well as performing the class and function declarations, ...
Read now
Unlock full access