[Python-Dev] subclass a module?

Guido van Rossum guido@python.org
Tue, 04 Jun 2002 02:08:53 -0400


> > Can I now subclass from modules?  And if so, what good does that do
> > me?
> 
> This seems to be a side effect of two things:
> (1) Python 2.2 will accept anything as a base class
> whose type is callable with the appropriate arguments,
> and (2) types.ModuleType doesn't seem to care what
> arguments you give it:

Thanks for explaining this!  (I've been away from this so long that it
baffled me a bit. :-)  I've fixed this by making the module
constructor sane: it now requires a name and takes an optional
docstring.

--Guido van Rossum (home page: http://www.python.org/~guido/)