Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.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.120 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.76; '*S*': 0.00; 'subject:python': 0.10; 'feedback.': 0.15; 'cc:addr:python-list': 0.15; '"does': 0.16; 'header:X-Face:1': 0.16; 'received:lan': 0.16; 'jan': 0.19; 'cc:no real name:2**0': 0.21; '(or': 0.22; 'header:In-Reply-To:1': 0.22; "shouldn't": 0.23; 'cc:2**0': 0.25; 'code': 0.25; 'subject: : ': 0.25; 'looks': 0.27; 'compare': 0.28; 'replaced': 0.28; 'cc:addr:python.org': 0.29; 'clean,': 0.30; 'equality': 0.30; 'value)': 0.30; 'error': 0.30; 'alex': 0.30; 'quite': 0.31; 'does': 0.32; 'tue,': 0.32; 'thanks': 0.32; 'there': 0.33; 'list.': 0.34; 'subject:project': 0.34; 'thank': 0.35; 'things': 0.35; 'issue': 0.35; 'could': 0.37; 'some': 0.38; 'think': 0.38; 'sometimes': 0.38; 'being': 0.39; 'subject:: ': 0.39; 'quick': 0.60; 'more': 0.61; 'your': 0.61; 'received:89': 0.65; 'saw': 0.66; 'subject:First': 0.67; 'e-mail.': 0.67; 'strange': 0.68; 'trial': 0.68; 'have.': 0.77; '-0800': 0.84; 'to:none': 0.93 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on jeftof X-Spam-Level: X-Spam-Status: No, score=0.2 required=7.0 tests=ALL_TRUSTED,MISSING_HEADERS autolearn=no version=3.3.1 Date: Tue, 17 Jan 2012 20:00:44 +0100 From: =?UTF-8?B?SsOpcsO0bWU=?= Cc: python-list@python.org Subject: Re: First python project : Tuner In-Reply-To: References: X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.8; x86_64-pc-linux-gnu) X-Face: "kBB1-!wF@,"j_&tJ&7; T,t)PeQkZg5?.:{p,s>/,+?b6pN5!yxZy^nRXA=*?W+|J9OG!W[rdx^VA^Sx`R"g,; +MzhAq"tZFg27W4qX+ZXvLX=%piZ6c.7@oSDHyQ0Mff#HGx<{ Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326826663 news.xs4all.nl 6856 [2001:888:2000:d::a6]:58212 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19066 Tue, 17 Jan 2012 10:16:02 -0800 (PST) gst a =C3=A9crit: > you have quite lot of such test: >=20 > > if self._index is 0: >=20 > I think it's better to compare with equality against 0 (or other > needed value) ; that is: >=20 > if self._index =3D=3D 0: Yes, I just saw that thanks to Alex Willmer's e-mail. I used to have =3D=3D, until for some strange reason I figured is was more pythonic, so I replaced all =3D=3D I could with is. I shouldn't have. I appended this issue on top of my TODO list. Although I try to read as much documentation as I can to do things clean, there is still a lot of trial and error and sometimes my criterion ends up being "does it works or does it not", whithout comprehensive understanding. =20 > otherwise your code looks very nice to me, though I just had a very > quick look ;) Thank you for the feedback. --=20 J=C3=A9r=C3=B4me