1

Possible Duplicate:
Creating constant in Python

Does Python support constants that are enforced by the interpreter? For example: integer constants. How about a programmer defined enumerated type?

Community
  • 1
  • 1
H2ONaCl
  • 10,644
  • 14
  • 70
  • 114
  • 1
    possible duplicate of [Creating constant in Python](http://stackoverflow.com/questions/2682745/creating-constant-in-python) and a [lot of others](http://stackoverflow.com/search?q=python+constants). – Felix Kling Dec 30 '10 at 13:57

1 Answers1

7

No. If you want something to be constant then just refrain from modifying it.

Duncan
  • 92,073
  • 11
  • 122
  • 156