Modules, namespaces, parents, and import

Aahz aahz at
Thu Feb 5 18:33:32 CET 2004

In article <1024qhk5i05nu8c at>,
R Baumann <rynt at> wrote:
>"Aahz" <aahz at> wrote in message
>news:bvthbd$n6a$1 at
>> In article <1022p0elv2vsd98 at>,
>> R Baumann <rynt at> wrote:
>>>Just a for instance -- Let's suppose that I had a fairly large
>>>"configuration loader" module that is used once in an application, and
>>>is never called upon again.  Why not "unload" or "release" that module
>>>from the interpreter's workspace, freeing up that chunk of memory?  If
>>>there's no need to use the module again, there's no need to keep it in
>>>memory, right?
>> What is "fairly large"?  If you mean that the data it loads is large,
>> but no longer needed after initalization, it should be simple enough to
>> discard the data -- provided you really don't need it.  If you mean that
>> the code is large, I've got a difficult time imagining a module large
>> enough to make a different to a Python application on a typical modern
>> machine.
>Yes, I meant the code.  However, if you don't think this is a problem,
>I won't worry about it.  Do you have any idea what the limits are to
>Python in regards to large applications in the 20-30MB range.  I would
>probably suppose the answer is "there is no problem". :-)

I've never heard of an *application* that large.  100kLOC is considered
a large Python application, and even at an average fifty characters per
line, that's still only 5MB.
Aahz (aahz at           <*>

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death."  --GvR

More information about the Python-list mailing list