What's the use of module spaces? (was Re: Circular Inheritance)

Ian Bicking ianb at colorstudy.com
Wed Jul 2 21:43:06 CEST 2003

On Wed, 2003-07-02 at 10:03, Aahz wrote:
> In article <mailman.1057124943.21695.python-list at python.org>,
> Ian Bicking  <ianb at colorstudy.com> wrote:
> >
> >You might encounter less problems if those classes go together in a
> >single module, but module boundaries are just there to help the
> >programmer organize code, they have little formal meaning.
> That's not true.  Modules define a namespace, and Python's execution
> model makes heavy use of the "global" (read, current module's) namespace
> for name resolution.

Certainly modules have considerable *semantics* and effect execution. 
But they have little *meaning*.  There's all sorts of semantics
associated with classes, but that's incidental to the meaning of a class
-- a class is a set up behaviors common to a kind of object.  A module
is just a pile of stuff the programmer likes to keep together.  It's
essentially a clerical feature.


More information about the Python-list mailing list