other python ideas

Douglas Alan nessus at mit.edu
Sun Apr 8 23:53:07 EDT 2001


"Steven D. Arnold" <stevena at permanent.cc> writes:

> Perhaps we could allow the programmer of a module to specify sets of
> names to be exported.  Some conventional export sets would be `*',
> `interface', `standard' and `minimal'.  Asterisk is already in use
> and would continue to mean what it does now -- all top-level names
> in the module would be exported.

Hmmm... I'm one of those who think that programmers should specify
every object used explicitly.  Consequently, I don't think that even
*more* mechanism for implicit binding of names should be added to the
language.

On the other hand, I don't think that having to use "import"
statements is necessarily a good thing.  I'd prefer to see some sort
of syntax like

   mymodule::foo(a, b, c)

This syntax would invoke mymodule.foo(), and would load module
"mymodule" it if it wasn't already loaded.  You'd probably also want
some sort of module aliasing notation so you could use

  alias m my_really_long_named_module
  m::foo(a, b, c)

in place of

  my_really_long_named_module::foo(a, b, c)

|>oug



More information about the Python-list mailing list