On 9/5/07, Tommy Grav <[EMAIL PROTECTED]> wrote: > > >> > > The simplest thing to do would be to have PyAstro.__init__.py > > import all > > the sub-modules, and define __all__ as the set of names that the > > package > > should inject into importing modules. > > > > Then you could write (for example) > > > > from PyAstro import numpy, constants, conversion, obsrvations > > > > However if you are simply worried about run-time efficiency then don't > > be: once a module is imported further imports essentially reduce to > > checking that the module is already present in the sys.modules > > dict, and > > so take almost no time at all. > > So am I understanding it right that a second import numpy statement > in a different module (and thus a different namespace) just results in > a binding to the already existing numpy "object"?
Yes, correct
-- http://mail.python.org/mailman/listinfo/python-list