November 2018
Beginner
304 pages
7h 35m
English
When a module is imported, after the local and global checks within the current program, the imported module will be examined for the called object as well (prior to checking the built-ins). The problem with this is that, unless the called object is explicitly identified with the dot nomenclature, an error will still be generated.
In the following screenshot, we see how the dot nomenclature works:

In this case, we attempt to calculate the square root of a number. Since this operation is unknown to the default Python interpreter, an error is generated. However, if we import the math library in line 2, and then ...
Read now
Unlock full access