Can I prevent modifying an object in Python?

Viewed 17330

I want to control global variables (or globally scoped variables) in a way that they are set only once in program initialization code, and lock them after that.

I use UPPER_CASE_VARIABLES for global variables, but I want to have a sure way not to change the variable anyway.

  • Does python provide that (or similar) feature?
  • How do you control the globally scoped variables?
3 Answers
Related