摘要:
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 阅读全文
摘要:
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 阅读全文