Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19066
| 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 | <jerome@jolimont.fr> |
| 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 | Jérôme <jerome@jolimont.fr> |
| Cc | python-list@python.org |
| Subject | Re: First python project : Tuner |
| In-Reply-To | <d4c8392c-7d66-4581-b33d-1045a93e997e@a11g2000vbz.googlegroups.com> |
| References | <mailman.4813.1326810025.27778.python-list@python.org> <d4c8392c-7d66-4581-b33d-1045a93e997e@a11g2000vbz.googlegroups.com> |
| 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 <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4818.1326826663.27778.python-list@python.org> (permalink) |
| 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 |
Show key headers only | View raw
Tue, 17 Jan 2012 10:16:02 -0800 (PST) gst a écrit: > you have quite lot of such test: > > > if self._index is 0: > > I think it's better to compare with equality against 0 (or other > needed value) ; that is: > > if self._index == 0: Yes, I just saw that thanks to Alex Willmer's e-mail. I used to have ==, until for some strange reason I figured is was more pythonic, so I replaced all == 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. > otherwise your code looks very nice to me, though I just had a very > quick look ;) Thank you for the feedback. -- Jérôme
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
First python project : Tuner Jérôme <jerome@jolimont.fr> - 2012-01-17 15:16 +0100
Re: First python project : Tuner Rick Johnson <rantingrickjohnson@gmail.com> - 2012-01-17 08:48 -0800
Re: First python project : Tuner Jérôme <jerome@jolimont.fr> - 2012-01-17 18:26 +0100
Re: First python project : Tuner Ben Finney <ben+python@benfinney.id.au> - 2012-01-18 06:38 +1100
Re: First python project : Tuner Rick Johnson <rantingrickjohnson@gmail.com> - 2012-01-17 12:38 -0800
Re: First python project : Tuner Chris Angelico <rosuav@gmail.com> - 2012-01-18 07:46 +1100
Re: First python project : Tuner Jérôme <jerome@jolimont.fr> - 2012-01-17 18:48 +0100
Re: First python project : Tuner gst <g.starck@gmail.com> - 2012-01-17 10:16 -0800
Re: First python project : Tuner Jérôme <jerome@jolimont.fr> - 2012-01-17 20:00 +0100
csiph-web