[Tutor] Global Gotchas (was Global Variable Gotcha)
Tim Johnson
tim@johnsons-web.com
Tue Jun 24 14:45:02 2003
* Neil Schemenauer <nas-pytut@python.ca> [030624 10:18]:
> Tim Johnson wrote:
> > Perhaps I should have eliminated the word 'variable'
> > from the subject. I would still like to have my
> > question answered, and I intend to be fully informed
> > on all caveats as well.
>
> The cleanest solution, IMHO, is to factor the shared variables into a
> module of its own and import it into the modules that need to use it.
Bingo! That really rings true (like a .h file in 'C' - sort of)
I like that.
thanks
tim
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com