Global variables for python applications

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Mon May 17 00:29:20 EDT 2010


On Sun, 16 May 2010 18:57:15 -0700, John Nagle wrote:

> James Mills wrote:
>> The only place global variables are considered somewhat "acceptable"
>> are as constants in a module shared as a static value.
> 
>     Python really ought to have named constants.

+1

Unfortunately, it will most likely require new syntax, and semantics. 
While the concept of a constant is pretty straightforward for immutable 
types like ints and strings, what about mutable types?

And then there's the moratorium, so even if we had agreement on semantics 
and syntax, and a patch, it couldn't be deployed for a few years.



-- 
Steven



More information about the Python-list mailing list