be*******@aol.com wrote:
I wish one could declare a constant in Python, analogous to 'const int
i=1;' in C++. Is there a way to get this effect?
With a bit of work, yes - Google will turn up some recipes for it.
It's basically never worth the effort because in practice it offers no advantage
over just a naming convention (i.e. nobody accidentally rebinds their values, so
doing that extra work doesn't provide any practical benefit).
-Dave