Love to get some feedback on my first python app!!!
rosuav at gmail.com
Mon Sep 22 20:25:33 CEST 2014
On Tue, Sep 23, 2014 at 4:24 AM, Chris Kaynor <ckaynor at zindagigames.com> wrote:
> On Mon, Sep 22, 2014 at 8:52 AM, Jean-Michel Pichavant
> <jeanmichel at sequans.com> wrote:
>> Anyway it's seems we agree anyway because your example perfectly
>> illustrate what I was trying to demonstrate:
>> print(cells) is very easy to understand, most of people would say 'no
>> need of any comment'. I think it does require a comment.
> But the thing that requires the comment is the "2", not the "print" or the
> "cells". And that comes to a more common issue: any number other than 0 or 1
> in code most likely needs a comment (that comment could be merely a variable
> name). Values of 0 or 1 may need a comment, but there are plenty of cases
> where they are used quite clearly - its much less likely that other numbers
> have obvious meaning.
Or in this case, replacing the list with a namedtuple is probably more useful.
More information about the Python-list