Globals

Sean 'Shaleh' Perry shalehperry at attbi.com
Wed Oct 16 13:39:25 EDT 2002


On Wednesday 16 October 2002 10:41, Michal Wallace wrote:
> On Wed, 16 Oct 2002, Newt wrote:
> > global strVar
> > global iVar
> >
> > Questions:
> >
> > 1. Is this the correct/best way?
> > 2. To save typing in all the global statements, can I put them in to an
> > include file or a source file?
> > 3. If I declare them in a .py file, do I still need the global commands
> > to use them within Classes and Functions etc defined within that same
> > module?
>
> If I really need a global variable (and when I think I do, I
> probably don't), I tend to put it in a separate module, say
> config.py and then type "import config; print config.myvar"
>

and I thought Hungarian notation was taken out back and shot years ago 
........ (-:




More information about the Python-list mailing list