None Too Soon

Q: When does the form “if(null == $x)” not save you from accidentally mixing up comparison (==) with assignment (=)?

A: When the language you are working with has no constants, and allows changing the value of keywords.

In version 2.4, Python has actually stopped letting you change the value of None. Don’t think that they’ve gone all soft on the “why would you ever do that” scene - True and False may still be modified.

Tags: