How to change the value of None in Python?
Posted
by michael
on Stack Overflow
See other posts from Stack Overflow
or by michael
Published on 2010-03-29T02:25:20Z
Indexed on
2010/03/29
2:33 UTC
Read the original article
Hit count: 329
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?
© Stack Overflow or respective owner