Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.107 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.80; '*S*': 0.01; '===': 0.09; 'cc:addr :python-list': 0.11; 'comparison.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'operators,': 0.16; 'subject:operators': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'why.': 0.24; 'cc:2**0': 0.24; 'header :In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'comparison': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'values.': 0.31; 'but': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'wrong': 0.37; 'pm,': 0.38; 'little': 0.38; 'tell': 0.60; 'different': 0.65; 'between': 0.67; 'bothered': 0.68; 'jul': 0.74; 'confusion.': 0.84; 'distinguish': 0.84; 'subject:Proposal': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=NCL4Mj1GOzErPXYMFAmjezk5vNYW1oGiUBPkfIs1V/4=; b=VYic/HuysfsdkafIqnMCf6S7PSNiiYb4bPDX1U/tEjFKYW5Jupk7AhWG6280XxdjqL jfSKlGGMMbbnifSduK5M0Mok3G6npkFdYIaUD/4wzstJDXiwaJ8mD63uwQ3HXO6strga yJ61j68OcGRe4LOoR8vf0s8nIYVj6oYKSV9D1imzIqIw9MwG/0KU/NN6wbVOnoDJ3xJN f9D3fq4/IG1mlnQ5PvE2qJEoZoTPZCbF4vBjdQ+XwTxUlWqKeAtI6Drhs2yrXuaQl4yQ XMCSk4gZYTnYSrb1fLejIXdr01YlBejdvUuwZxVIUHLvOfjY0q6kEOE27nc5U9GPWFYk Yp5w== MIME-Version: 1.0 X-Received: by 10.52.172.5 with SMTP id ay5mr1476312vdc.38.1404897828834; Wed, 09 Jul 2014 02:23:48 -0700 (PDT) In-Reply-To: <53bd053e$0$2746$c3e8da3$76491128@news.astraweb.com> References: <53bce8a3$0$2746$c3e8da3$76491128@news.astraweb.com> <53bd053e$0$2746$c3e8da3$76491128@news.astraweb.com> Date: Wed, 9 Jul 2014 19:23:48 +1000 Subject: Re: Proposal: === and !=== operators From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404897831 news.xs4all.nl 2928 [2001:888:2000:d::a6]:41857 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74244 On Wed, Jul 9, 2014 at 7:02 PM, Steven D'Aprano wrote: > If you can tell the difference between x=y and x==y you should be able to > also distinguish x===y. But I accept that it's a little sub-optimal. I'm not bothered so much by the "which one is this" confusion as the "which should this be" confusion. With = and ==, it's easy: = for assignment, == for comparison. But == and === would both be comparison operators, and almost never would return different values. People would use the wrong one frequently, and not know why. ChrisA