Defining/declaring constants in Python

Christopher Koppler klapotec at chello.at
Tue Jul 29 11:00:44 EDT 2003


On Tue, 29 Jul 2003 11:56:54 GMT, Michael Hudson <mwh at python.net>
wrote:

>Christopher Koppler <klapotec at chello.at> writes:
>
>> If you really, really, REALLY want a varia^Wconstant that cannot be
>> changed, no matter how hard you try, in Python, have a look at this:
>> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65207
>
>Of course, it's still possbile to change the values of these
>'constants', you just have to muck about quite a bit to manage it.

Oops. Yeah, should have written: constant that cannot be changed,
unless you're prepared to do some very heavy lifting ;-) 


--Christopher




More information about the Python-list mailing list