摘要:
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 阅读全文
posted @ 2016-12-27 12:33
圆旭
阅读(206)
评论(0)
推荐(0)
摘要:
There is a simple rule of thumb to tell you when to use == or is. == is for value equality. Use it when you would like to know if two objects have the 阅读全文
posted @ 2016-12-27 12:28
圆旭
阅读(246)
评论(0)
推荐(0)