Here I am again, same old arguments
Tim Roberts
timr at probo.com
Sat Oct 15 13:37:04 EDT 2005
Steven D'Aprano <steve at REMOVETHIScyber.com.au> wrote:
>
>Global variables aren't *entirely* bad. I use them myself, sometimes for
>constants (well, pseudo-constants -- Python doesn't enforce constants) and
>short, quick 'n' dirty throw away code.
>
>But in general, as your code gets bigger and more complicated, using
>global variables gets more dangerous, unreliable, harder to debug, and
>generally a bad idea. Let me show you some examples.
This gets my vote for post-of-the-week. If there were a bulletin board
that was required reading for beginning programmers, this would definitely
need to be tacked up to it.
Nice work.
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list