Re: Style question...

Discussion in 'Python' started by rzed, Aug 28, 2003.

  1. rzed

    rzed Guest

    Peter Hansen wrote:
    > "U. N. Owen" wrote:
    >>
    >> For the moment I work on (a small part of) a project
    >> that has hundreds of thousands of lines, almost
    >> eveything in Python (and some in C and Fortran),
    >> and when you have a loop several pages long, or
    >> nested blocks to 8 levels or more, I may say
    >> it's *very* convenient to see where the end
    >> of a block exactly is. It's convenient to
    >> have some long variable names too.

    >
    > I use Scite, which provides a graphical means of representation
    > the indentation, with vertical lines that extend down at every
    > indent level. (It would have to be later in the day for me to
    > be coherent enough to describe it better.) Suffice to say that
    > it provides more than adequate (for me) visual indication of the
    > end of a block that stretches too far.
    >
    > A better point I'd make however is that if you have a loop several
    > pages long, or a nested block 8 levels deep, the code needs
    > refactoring! Saying this occurs in a large project does nothing
    > to excuse it: the more code you have, the greater the need for
    > structuring it well.
    >


    The only times I've seen the lack of a block delimiter as a problem is
    when somebody plops some sample code in a usenet message and uses tabs
    for indenting. OE strips out the leading tabs for some reason, so
    everything winds up flush to the left margin. Once in awhile it is not
    possible to recreate the proper indention, and for that reason I try
    to include comment delimiters in code I send. When I don't forget, at
    least. A better solution might be to physically restrain the posters
    of tab-infested code from doing that, but there are only so many hours
    in the day. And if OE wouldn't do what it does ... but then, where
    would be the fund in that?

    --
    rzed
     
    rzed, Aug 28, 2003
    #1
    1. Advertising

  2. Steve Lamb wrote:

    > On 2003-08-28, rzed <> wrote:
    >> A better solution might be to physically restrain the posters of
    >> tab-infested code from doing that, but there are only so many hours in
    >> the day. And if OE wouldn't do what it does ... but then, where would
    >> be the fund in that?

    >
    > Well, actually, a better solution would be to skip OE for something
    > sensible, no? :)


    OE is far from the only news user-agent that doesn't display tabs the
    way you might like -- KDE's KNode has similar issues, for example.


    Alex
     
    Alex Martelli, Aug 29, 2003
    #2
    1. Advertising

  3. rzed

    rzed Guest

    Steve Lamb wrote:
    > On 2003-08-28, rzed <> wrote:
    >> A better solution might be to physically restrain the posters of
    >> tab-infested code from doing that, but there are only so many
    >> hours in the day. And if OE wouldn't do what it does ... but then,
    >> where would be the fund in that?

    >
    > Well, actually, a better solution would be to skip OE for
    > something sensible, no? :)


    On my own hook, I'm doing that, but here in the office I don't have
    the choice. I do have the choice to spell "fun" correctly, though I
    see I opted not to.

    --
    rzed
     
    rzed, Aug 29, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Nicholson
    Replies:
    3
    Views:
    755
    Rob Nicholson
    May 28, 2005
  2. Replies:
    0
    Views:
    2,467
  3. Replies:
    1
    Views:
    794
    Bertilo Wennergren
    Nov 24, 2003
  4. Hardeep Rakhra
    Replies:
    8
    Views:
    644
    Hardeep Rakhra
    Jan 15, 2004
  5. Ken Varn
    Replies:
    0
    Views:
    473
    Ken Varn
    Apr 26, 2004
Loading...

Share This Page