home changes contents help options

Scope

Scope Ordering

  1. the innermost scope consists of the local names and is searched first

  2. the namespaces of any enclosing functions are then searched starting with the nearest enclosing scope

  3. the middle scope, searched next, contains the current module's global names

  4. the outermost scope (searched last) is the namespace containing built-in names

Loading Modules

  1. current directory

  2. PYTHONPATH

  3. installation-dependent default

Built-ins

References