Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'explicit': 0.07; 'subject:bug': 0.07; 'adopted': 0.09; 'ambiguity': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'statements': 0.09; 'worked.': 0.09; 'python': 0.11; 'guess.': 0.16; 'insisted': 0.16; 'languages)': 0.16; 'python3.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'silly': 0.16; 'subject:python3': 0.16; 'wrote:': 0.18; 'comfortable': 0.22; 'header:User-Agent:1': 0.23; 'url:moin': 0.24; 'mon,': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'lines': 0.31; 'url:wiki': 0.31; '+0100,': 0.31; 'url:python': 0.33; 'test': 0.35; 'but': 0.35; 'there': 0.35; 'doing': 0.36; "didn't": 0.36; 'possible': 0.36; 'url:org': 0.36; 'clear': 0.37; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'read': 0.60; 'most': 0.60; "you're": 0.61; 'personal': 0.63; 'myself': 0.63; 'face': 0.64; 'stand': 0.64; 'more': 0.64; 'beats': 0.84; 'zen': 0.84; '\xe2\x80\xa6': 0.84; 'received:89': 0.85; 'refuse': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] Date: Mon, 13 May 2013 23:53:01 +0100 References: <51912C27.3020809@nedbatchelder.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-89-240-174-199.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: X-Antivirus: avast! (VPS 130513-1, 13/05/2013), Outbound message X-Antivirus-Status: Clean 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368485596 news.xs4all.nl 16002 [2001:888:2000:d::a6]:47098 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45267 On 13/05/2013 22:17, Alister wrote: > On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote: > >> I think it is more readable. When doing more complicated statements I >> use != instead, but when it's a single test I prefer not … == >> >> It's a personal thing. It may also have to do with the fact that I >> didn't know python had != when I was a novice. >> On 13 May 2013 19:08, "Ned Batchelder" wrote: >> > > I would then still write it as not (x == y) to make it clear to myself & > avoid any possible confusion although I think that X != Y is much > cleaner. > 2 lines from the zen stand out here:- > > Explicit is better than implicit. > in the face of ambiguity refuse the temptation to guess. > > there are many features of Python (& other languages) i did not now when > I started but have adopted once I understood what they were & how they > worked. then again use what you are most comfortable with. > > Practicality beats purity > I much prefer the alternative <> for != but some silly people insisted that this be removed from Python3. Just how stupid can you get? -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence