[Tutor] Re: Baffled: why doesn't range work?

Sheila King sheila@thinkspot.net
Thu, 26 Jul 2001 20:20:33 -0700


On Thu, 26 Jul 2001 22:10:47 -0500, "Christopher Smith"
<csmith@blakeschool.org>  wrote about [Tutor] Re: Baffled: why doesn't
range work?:

:But I have been working on
:some class material myself and ran into this sort of problem
:and found help from the following FAQ entry:
:
:http://www.python.org/cgi-bin/faqw.py?req=show&file=faq04.008.htp
:
:4.8. When I have imported a module, then edit it, 
:and import it again (into the same Python process), 
:the changes don't seem to take place. What is going on?
:For reasons of efficiency as well as consistency, Python only reads 
:the module file on the first time a module is imported. (Otherwise 
:a program consisting of many modules, each of which imports the 
:same basic module, would read the basic module over and over again.) 
:To force rereading of a changed module, do this: 
:
:
:
:        import modname
:        reload(modname)

Thanks. I did do this:

del modname
import modname

Is that not as good as
reload(modname)

???

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/