Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!ottix-news.ottix.net!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!roy From: Roy Smith Newsgroups: comp.lang.python Subject: Re: Proposal: === and !=== operators Date: Wed, 09 Jul 2014 16:47:22 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Lines: 19 Message-ID: References: <53bce8a3$0$2746$c3e8da3$76491128@news.astraweb.com> <53bd3a1d$0$29995$c3e8da3$5496439d@news.astraweb.com> NNTP-Posting-Host: localhost X-Trace: reader1.panix.com 1404938843 7927 127.0.0.1 (9 Jul 2014 20:47:23 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 9 Jul 2014 20:47:23 +0000 (UTC) User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: csiph.com comp.lang.python:74279 In article <53bd3a1d$0$29995$c3e8da3$5496439d@news.astraweb.com>, Steven D'Aprano wrote: > On Wed, 09 Jul 2014 08:27:28 -0400, Roy Smith wrote: > > > We would have *three* ways to compare for equality (==, ===, and is). > > `is` does not, never has, and never will, be a test for equality. > > py> x = [] > py> y = [] > py> x is y > False That is a very narrow legalistic way of looking at things. If you don't like the word "equality", substitute a more generic word, such as "sameness" We continually have threads about when to use "==" and when to use "is". Clearly, there is confusion about them. Adding another way to test for sameness will just increase the confusion.