Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8720

Re: Anyone want to critique this program?

References <4be432d4-5185-4101-9699-de5524c3fa57@x3g2000yqj.googlegroups.com> <mailman.579.1309662170.1164.python-list@python.org> <5c3aba69-fddd-45ed-bf0c-8fa98df7aa73@r2g2000vbj.googlegroups.com>
Date 2011-07-03 14:00 +1000
Subject Re: Anyone want to critique this program?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.582.1309665619.1164.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, Jul 3, 2011 at 1:41 PM, John Salerno <johnjsal@gmail.com> wrote:
> Yeah, I considered that, but I just hate the way it looks when the
> line wraps around to the left margin. I wanted to line it all up under
> the opening quotation mark. The wrapping may not be as much of an
> issue when assigning a variable like this, but I especially don't like
> triple-quoted strings that wrap around inside function definitions.
> That seems to completely throw off the indentation. Do people still
> use triple-quotes in that situation?

Jury's out on that one. You can either back-tab it to the left (looks
ugly), or indent it and then clean it up in code (IS ugly). Up to you
to figure out what's best for your code, and if you want to indent it,
your current way is quite possibly the cleanest.

> Minor or not, it makes sense. I'm picky about things like that too, so
> now that you've pointed it out, I'm compelled to change the names so
> they make sense! :)

:) Names tend to stay the same when the functions they're attached to
grow and shift. Sometimes you end up with these great warts in huge
production code... it's sometimes just too much work to change things.

> Thanks a lot for the tips! I'm going to go back over the whole thing
> and rework some of it. And I'm only doing this for the sake of
> learning, so even the small tips help me to think more like a
> programmer. :)

Learning's good! And Python's an excellent language for the purpose.
Code quickly, invoke quickly (no compilation stage), and see the
results of the work.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Anyone want to critique this program? John Salerno <johnjsal@gmail.com> - 2011-07-02 19:19 -0700
  Re: Anyone want to critique this program? Chris Angelico <rosuav@gmail.com> - 2011-07-03 13:02 +1000
    Re: Anyone want to critique this program? John Salerno <johnjsal@gmail.com> - 2011-07-02 20:41 -0700
      Re: Anyone want to critique this program? Chris Angelico <rosuav@gmail.com> - 2011-07-03 14:00 +1000
      Re: Anyone want to critique this program? "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> - 2011-07-03 18:06 +0000
        Re: Anyone want to critique this program? John Salerno <johnjsal@gmail.com> - 2011-07-03 20:25 -0700
          Re: Anyone want to critique this program? "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> - 2011-07-04 16:37 +0000
            Re: Anyone want to critique this program? Chris Angelico <rosuav@gmail.com> - 2011-07-05 03:21 +1000
              Re: Anyone want to critique this program? Ben Finney <ben+python@benfinney.id.au> - 2011-07-05 10:03 +1000
                Re: Anyone want to critique this program? Chris Angelico <rosuav@gmail.com> - 2011-07-05 10:11 +1000
      Re: Anyone want to critique this program? Ben Finney <ben+python@benfinney.id.au> - 2011-07-04 07:37 +1000

csiph-web