why () is () and [] is [] work in other way?

Roy Smith roy at panix.com
Wed Apr 25 20:09:49 EDT 2012


In article <4f9833ff$0$29965$c3e8da3$5496439d at news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:

> 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

I love it.   Thanks for posting that.



More information about the Python-list mailing list