Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78141
| Path | csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'debug': 0.07; '22,': 0.09; 'name?': 0.09; 'sure,': 0.09; 'url:github': 0.09; 'cc:addr:python- list': 0.11; 'def': 0.12; "':'": 0.16; '*why*': 0.16; '10:00': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function?': 0.16; 'happily': 0.16; 'readability': 0.16; 'url:py': 0.16; 'subject:python': 0.16; '(you': 0.16; 'wrote:': 0.18; 'meant': 0.20; 'help.': 0.21; 'cc:addr:python.org': 0.22; 'instance,': 0.24; 'skip:{ 20': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'comments': 0.31; 'comments,': 0.31; 'lot.': 0.31; 'sep': 0.31; 'subject:some': 0.31; 'though.': 0.31; 'url:python': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; 'so,': 0.37; 'too': 0.37; 'pm,': 0.38; 'bad': 0.39; 'places': 0.64; 'more': 0.64; 'subject:!!!': 0.74; 'subject:get': 0.81; 'hour,': 0.84; 'url:master': 0.84; 'subject:Love': 0.91; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=FuqGKDbuX480kG3rTMUr2LdUmp84IlCeSuFm8tTkvMQ=; b=jyjaO2pESZrSCzPnJ4o6UbEmJ5uAx1Xvok9VMkR6h1fZJDC9+DxJm+JlXMiq65+0Ae PdyCPH5/nJtFK2V3y8jRqs7almnZisoM6yYHvG5eLwRK8ATC8GQOXmm1cOZ3IrZuLAT/ UdYuuLYo+F4rPJ+0Y4gtZaRW/GN5hSvYmuFNJnFPvhX6Z8ThV+XwBU/M83XeVyTPOiDU dvXoMdsl4whIAJhoJINGKmydsVsY7PQMhXNcr2QYrWBBom1m471eSbxL/y3nxh4iJ0C9 4om5twoN53SPplzHhy9I8xZcjpCWWrYt+CW5ZmWq1YHB/OtSPdrv4HVuAa+GtSMyCZ0k PLew== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.176.202 with SMTP id ck10mr14160124igc.2.1411388580201; Mon, 22 Sep 2014 05:23:00 -0700 (PDT) |
| In-Reply-To | <4e75613a-706a-4441-b94a-49dbedf3df28@googlegroups.com> |
| References | <42e68de9-7528-46fc-8c74-c0baa1d6199e@googlegroups.com> <4e75613a-706a-4441-b94a-49dbedf3df28@googlegroups.com> |
| Date | Mon, 22 Sep 2014 22:23:00 +1000 |
| Subject | Re: Love to get some feedback on my first python app!!! |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14197.1411388582.18130.python-list@python.org> (permalink) |
| Lines | 30 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1411388582 news.xs4all.nl 2851 [2001:888:2000:d::a6]:54809 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:78141 |
Show key headers only | View raw
On Mon, Sep 22, 2014 at 10:00 PM, <vek.m1234@gmail.com> wrote:
> https://github.com/Veek/Python/blob/master/IRC/Hexchat/fake_ctcp.py
> that's not too bad as far as readability is concerned and it's bereft of all comments {:p
Sure, I can work out what it's doing without comments. Doesn't mean
comments are bad, though. Also, without comments, I have no idea *why*
it's doing what it does. For instance, this:
> def debug(msg):
> hexchat.prnt('{}'.format(msg))
Why not just do this:
debug = hexchat.prnt
Or, better still, just use hexchat.prnt() everywhere, instead of
having a local name? (You happily use hexchat.* in other places.) Is
it meant to be monkey-patched externally? Is it meant to be a
one-place edit? What's the purpose of this one-line function?
> date = str(date_s) + ' ' + str(hour) + ':' + str(min) + ':' + str(sec)
You use .format() in places where it's completely unnecessary, but
eschew it when it would make your code more readable.
date = "%s %s:%s:%s" % (date_s, hour, min, sec)
date = "{} {}:{}:{}".format(date_s, hour, min, sec)
So, comments would definitely help. In some cases, would help a lot.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-20 06:16 -0700
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-21 00:58 +1000
Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-20 16:30 +0100
Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-20 18:33 -0700
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-21 11:48 +1000
Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-20 20:44 -0700
Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-21 01:53 -0700
Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 02:00 -0700
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 19:23 +1000
Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 04:47 -0700
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 22:09 +1000
Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 06:35 -0700
Re: Love to get some feedback on my first python app!!! C Smith <illusiontechniques@gmail.com> - 2014-09-22 06:48 -0700
Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 08:12 -0700
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 23:57 +1000
Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:17 +0100
Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:17 +0100
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-23 02:58 +1000
Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:10 +0100
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-23 02:26 +1000
Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 05:00 -0700
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 22:23 +1000
Re: Love to get some feedback on my first python app!!! Larry Martell <larry.martell@gmail.com> - 2014-09-22 09:02 -0400
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 23:21 +1000
Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:11 +0100
Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-22 06:17 -0700
Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 23:28 +1000
Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:14 +0100
Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-22 06:19 -0700
csiph-web