Const in python?

Anand anand at calbay.com
Mon Mar 24 13:23:11 EST 2003


Wouldn't it be a nice idea to have constants in Python? I think when
programmers intend some of the variables to be const, the behavior
shouldn't be allowed to be altered. It would be nice to declare
'maxint' in sys to be a const rather than allowing programmers to
change the value and cause the program to fail as a result of this
change.

Anand. 
anand at calbay.com (Anand) wrote in message news:<c6303995.0303232258.7e77682 at posting.google.com>...
> Python 2.3a2 (#39, Feb 19 2003, 17:58:58) [MSC v.1200 32 bit (Intel)] on win32
> Type "copyright", "credits" or "license" for more information.
> IDLE 0.8 -- press F1 for help
> >>> True
>  True
> >>> False
>  False
> >>> True = False
> >>> True
>  False
> >>> False
>  False
> >>> 
> 
> has anyone tried this before?
> 
> Anand




More information about the Python-list mailing list