why () is () and [] is [] work in other way?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Apr 25 13:27:27 EDT 2012
On Wed, 25 Apr 2012 13:42:31 +0200, Thomas Rachel wrote:
> Two objects can be equal (=) without being identical (≡), but not the
> other way.
>>> x = float('nan')
>>> y = x
>>> x is y
True
>>> x == y
False
By the way, in mathematics, ≡ normally means "is equivalent to", which is
not quite the same as "identical to".
http://mathworld.wolfram.com/Equivalent.html
--
Steven
More information about the Python-list
mailing list