Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19066
| Date | 2012-01-17 20:00 +0100 |
|---|---|
| From | Jérôme <jerome@jolimont.fr> |
| Subject | Re: First python project : Tuner |
| References | <mailman.4813.1326810025.27778.python-list@python.org> <d4c8392c-7d66-4581-b33d-1045a93e997e@a11g2000vbz.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4818.1326826663.27778.python-list@python.org> (permalink) |
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