Python None comparison: should I use “is” or ==?
Use is when you want to check against an object's identity (e.g. checking to see if var is None). Use == when you want to check equality (e.g. Is var equal to 3?).
ref: http://stackoverflow.com/questions/14247373/python-none-comparison-should-i-use-is-or

浙公网安备 33010602011771号