Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78190
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Love to get some feedback on my first python app!!! |
| Date | 2014-09-23 13:59 +1000 |
| Organization | A noiseless patient Spider |
| Message-ID | <lvqr6u$fo1$1@dont-email.me> (permalink) |
| References | <CAPTjJmrMq=rCXYFMzCDwFDt577UBdh6O=xNDHM6+n=M-vg6KLA@mail.gmail.com> <1142710437.7070860.1411401142913.JavaMail.root@sequans.com> <CALvWhxvoXfrENBKCWvPE8crRRwk7ErybKe+JsFEezckRzu43Nw@mail.gmail.com> <mailman.14228.1411410342.18130.python-list@python.org> |
On 23/09/2014 4:25 AM, Chris Angelico wrote: > On Tue, Sep 23, 2014 at 4:24 AM, Chris Kaynor <ckaynor@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 clarify things.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-23 04:25 +1000 Re: Love to get some feedback on my first python app!!! alex23 <wuwei23@gmail.com> - 2014-09-23 13:59 +1000
csiph-web