First python project : Tuner

Jérôme jerome at jolimont.fr
Tue Jan 17 14:00:44 EST 2012


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



More information about the Python-list mailing list