PyMyth: Global variables are evil... WRONG!

Alister alister.ware at
Tue Nov 12 15:32:21 CET 2013

On Mon, 11 Nov 2013 18:06:09 -0800, Rick Johnson wrote:

> In this thread, i want to get to the bottom of this whole
> "global-phobia" thing once and for all, and hopefully help you folks
> understand that globals are not all that bad -- when DESIGNED and USED
> correctly that is!

it is the final part of that statement that is important

As a generality "Avoid Globals" is not a bad "rule".
there may be some occasions when breaking this rule may be acceptable but 
it requires great experience & detailed knowledge to know when this is 
the right thing to do.

As an analogy music has may general rules that musicians are wise to 
Some pieces of music that break these rules are great because they have 
broken the rules but most are not. those that are great are great because 
the musician in question understands the reasons for the rules & how 
breaking them will affect the end product, the ones that are bad are 
because the musician does not know enough about music to even know the 
rule exists.

Immutability, Three Rules of:
	(1)  If a tarpaulin can flap, it will.
	(2)  If a small boy can get dirty, he will.
	(3)  If a teenager can go out, he will.
	(3a) If a teenager cant go out, he will. :-)

More information about the Python-list mailing list