How to change the value of None in Python?
- by michael
I'm currently reading chapter 5.8 of Dive Into Python and Mark Pilgrim says:
There are no constants in Python. Everything can be changed if you try hard enough. This fits with one of the core principles of Python: bad behavior should be discouraged but not banned. If you really want to change the value of None, you can do it, but don't come running to me when your code is impossible to debug.
I tried this in the interpreter
None = "bad"
I get a
SyntaxError: assignment to None
Just out of curiosity how do you change None?