April 2014
Beginner to intermediate
634 pages
15h 22m
English
There are two approaches to the contents of a library module. Some modules are an integrated whole, some are more like a collection of less-well-related items. When we've designed a module as a whole, it will often have a few classes or functions that are the public-facing API of the module. When we've designed a module as a collection of loosely related items, each individual class or function tends to stand alone.
We often see this distinction in the way we import and use a module. We'll look at three variations:
import some_module commandThe some_module.py module file is evaluated and the resulting objects are collected into a single namespace called some_module. This requires us to use qualified names ...