Love to get some feedback on my first python app!!!
wuwei23 at gmail.com
Tue Sep 23 05:59:26 CEST 2014
On 23/09/2014 4:25 AM, Chris Angelico wrote:
> On Tue, Sep 23, 2014 at 4:24 AM, Chris Kaynor <ckaynor at zindagigames.com> wrote:
>> 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.
Depending on the use case, binding a slice to a name can also help
More information about the Python-list