how can I reload 'from *' ?

Greg Ewing greg at cosc.canterbury.ac.nz
Tue May 30 00:06:41 EDT 2000


Mike Cat wrote:
> 
> No way. There is no module 'HUGO' to reload if you do 'from HUGO import *'.

Or more precisely, although you can

   import HUGO
   reload(HUGO)

to reload the module HUGO, that won't make any difference 
to the values you've already imported from it into the 
namespaces of other modules.

On the other hand, if you just 'import HUGO' and then
use HUGO.whatever everywhere, there is no problem.

YARNTUFMI* (yet another reason not to use 'from module import *').

-- 
Greg Ewing, Computer Science Dept,
+--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+



More information about the Python-list mailing list