我现在开始使用jython2.7.0,但是python2.7.15之间没有什么区别。
例如,在python
中a =“ hello”,b =“ hello”,“ a is b”和“ a == b”将返回True。
但是在jython2.7.0中,“ a is b”返回False,“ a == b”返回True,有人知道为什么吗?
>>>jython
>>>
>>>a = "hello"
>>>b = "hello"
>>>
>>>a is b
>>>False
>>>
>>>a == b
>>>True
>>>
>>>a = 1
>>>b = 1
>>> a is b
>>>True