In Python3 this expression evaluates as False
:
b"" == ""
while in Python2 this comparison is True
:
u"" == ""
Checking for identity with is
obviously fails in both cases.
But why would they implement such a behaviour in Python3?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…