[Types-sig] Re: rebinding (was: const)

Paul Prescod paul@prescod.net
Fri, 31 Dec 1999 04:31:54 -0500


Greg Stein wrote:
> 
> ...
> >  * module -- we must always disallow rebinding these because we don't
> > have a notion of two modules with the "same interface". Maybe in some
> > future version we could.
> 
> Untrue. Ever look at the "anydbm" module and its cohorts? How about the
> DBAPI modules?

I didn't say that there was no notion of modules with the same
interface. I said that our type declaration sub-language does not have
such a notion. 

> I've said before: modules and classes both have the notion of an
> interface. We ought to be able to associate an interface with a module!

There is some elegance in this model but it is also pretty weird the way
Pythonista's use modules instead of classes for some types of
polymorphism. I want to know where Guido wants to go in people's
thinking on modules.

> Note on functions: how is a function declared to have a particular
> signature? 

Just through an attribute declaration. It can be either the top level or
in an interface declaration.

 Paul Prescod