Checking your account

You can read the lesson while its saved answers and constructions load. Learning controls will open once that work is ready.

Modules and Project Structure

Python Module Namespaces and PEP 328

BOTIE

Splitting a program into files creates a naming problem: which module does an import identify, and which names should it expose? Python's module system gives each module its own namespace while allowing another module to import the behavior it needs.

PEP 328, created in 2003, addressed ambiguity between modules within a package and modules elsewhere on the import path. Absolute imports and explicit relative imports express different relationships. This was a documented development in Python's import rules, rather than an invention of modular programming.

Sources for this history