On Thu, Feb 26, 2009 at 9:42 AM, Anand Chitipothu <[email protected]> wrote:
>
>> [...].  In our script the addition to globals() is done in
>> the
>>
>> if __name__ == 'main':
>>   ...
>>
>> section, so when loaded as a module this section is not executed, [...]
>
> What  is the problem in fixing this?

The only problem I was afraid of, was having extra unwanted keys in
the globals() dictionary.  It means that on reload, you do not get a
completely clean environment, but one with up to date values for
active keys/names and anything that has not been explicitly replaced
is untouched in the namespace i.e. not removed. For a development
environment I, personally, don't find this a problem, but others
might.  For me, I would rather have the extra cruft in the namespace
and not have my global settings "disappeared", than have a guaranteed
pristine namespace, that completely overwrites the current namespace.
If things become problematic or too messy, I can always start a new
webpy session, giving me the needed pristine environment.  For me
there is no reason not to fix this, but others might disagree.

Not sure if that made things any clearer. :(

Rohan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to