handling modules in packages
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Wed Sep 5 10:43:02 EDT 2007
Tommy Grav a écrit :
(snip)
>
> 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.
And FWIW, you can drop the quotes around the word 'object', because
Python's modules *are* objects:
Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.__class__
<type 'module'>
>>>
HTH
More information about the Python-list
mailing list