Importing and namespace visibility

jean-marc jmdeschamps at cvm.qc.ca
Mon May 16 12:35:31 EDT 2005


Merci Bruno, ( and also to Fredrik )

So I think I understand correctly, if I say that:
each modulkes requires its own set of reference to whatever objects it
needs to speak. The interpreter wil see not to create extra copies of
the compiled code if many modules import the same modules but will make
them all point to the one already existing (in this program's
execution).

Practically, it means every module import whatever it needs - be
careful with recursive imports - keep things tidy by using the 'import
suchModule' (and use dotted name chains to reach whatever is needed).

Again thank you,

JM
PS Nice weather in Bordeaux ? I've been there once... (when I was young
(sigh))




More information about the Python-list mailing list