Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.087 X-Spam-Evidence: '*H*': 0.83; '*S*': 0.00; 'explicit': 0.07; 'subject:bug': 0.07; 'ambiguity': 0.09; 'statements': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '10:17': 0.16; 'guess.': 0.16; 'subject:python3': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'header :In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'lines': 0.31; '+0100,': 0.31; '13,': 0.31; 'go.': 0.31; 'common': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; "didn't": 0.36; 'possible': 0.36; 'should': 0.36; 'clear': 0.37; 'being': 0.38; 'fact': 0.38; 'pm,': 0.38; 'most': 0.60; 'hope': 0.61; 'personal': 0.63; 'myself': 0.63; 'face': 0.64; 'stand': 0.64; 'more': 0.64; 'charset:windows-1252': 0.65; 'here': 0.66; 'to:addr:ntlworld.com': 0.84; 'zen': 0.84; 'refuse': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=+QNC7z63L2I3tGv0qRaiZ58y8wh/AdUyIjDE8JAw6Mk=; b=QCa2ejckRy/40SrgMzweBvz6EEDjTaHEHaoX8PuLyHz9jVLdgv3CTUMOpWBUdhb16J 0DFIvo+W4xyM2HZ5cQtAL2e9wFZmwek+RbwC0m1voRnqXkfVH0yIcPDWDLaCrSd71SBZ n+dNc5VY8l/rGHowvGmPi/0oui20TJvP0GEuF0Eyp9bggFi4lfLwfrWMzrZks3879xL7 PC2GFWSr3RzF7HHcfsKkEuHrDx6w1OOVO5tn5rK/fY9u6/cVLFxUBhRpGh3LhSQe2a4z TBJwMq0IM7q+2f6qrqwO033uqR82n/eeSjeM6OWstAKW/MxxX4gjvLR0zmO7eSQNz6Nj w9Mw== MIME-Version: 1.0 X-Received: by 10.224.192.6 with SMTP id do6mr22243220qab.82.1368481709089; Mon, 13 May 2013 14:48:29 -0700 (PDT) In-Reply-To: References: <51912C27.3020809@nedbatchelder.com> Date: Mon, 13 May 2013 22:48:28 +0100 Subject: Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] From: =?ISO-8859-1?Q?F=E1bio_Santos?= To: Alister Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: "python-list@python.org" 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368481718 news.xs4all.nl 15905 [2001:888:2000:d::a6]:56100 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45265 On Mon, May 13, 2013 at 10:17 PM, Alister wrote= : > On Mon, 13 May 2013 19:28:29 +0100, F=E1bio Santos wrote: > >> I think it is more readable. When doing more complicated statements I >> use !=3D instead, but when it's a single test I prefer not =85 =3D=3D >> >> It's a personal thing. It may also have to do with the fact that I >> didn't know python had !=3D when I was a novice. >> On 13 May 2013 19:08, "Ned Batchelder" wrote: >> > > I would then still write it as not (x =3D=3D y) to make it clear to mysel= f & > avoid any possible confusion although I think that X !=3D 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. > And here I was, thinking I was being pythonic. I hope other people using my code will be able to understand it well, not just myself, so using the most common idioms should be the best way to go. -- F=E1bio Santos