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


Groups > comp.lang.python > #82102 > unrolled thread

Re: Maintaining Maximum Line Length When Using Tabs Instead of Spaces?

Started byBen Finney <ben+python@benfinney.id.au>
First post2014-12-08 15:47 +1100
Last post2014-12-08 15:47 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Maintaining Maximum Line Length When Using Tabs Instead of Spaces? Ben Finney <ben+python@benfinney.id.au> - 2014-12-08 15:47 +1100

#82102 — Re: Maintaining Maximum Line Length When Using Tabs Instead of Spaces?

FromBen Finney <ben+python@benfinney.id.au>
Date2014-12-08 15:47 +1100
SubjectRe: Maintaining Maximum Line Length When Using Tabs Instead of Spaces?
Message-ID<mailman.16705.1418014206.18130.python-list@python.org>
Chris Angelico <rosuav@gmail.com> writes:

> On Mon, Dec 8, 2014 at 1:15 PM, Aahan Krish <krish@aahan.me> wrote:
> > My question is to them (because I want to use tabs too) is: how do you
> > maintain a line-length of 79 characters?
> >
> > E.g. scenario: The tab setting in your editor could be 2 or 4, and in
> > other developer's browser it could be 8. The code will be longer than
> > 79 chars in the latter's editor.
>
> Easy: You stop fretting about 79 characters. :)

The question is a good one, especially when one considers the use of an
automated test to detect lines which violate an agreed style guide.

> If your policy is "lines are no more than 80-100 characters long",

Such a policy still needs to know how many columns a U+0009 TAB
character is to be counted, if an automated test is to be useful.

You may not find value in such an automated “does this code meet the
agreed style guide?” test, but many do. Perhaps the OP is one.

-- 
 \         “How wonderful that we have met with a paradox. Now we have |
  `\                        some hope of making progress.” —Niels Bohr |
_o__)                                                                  |
Ben Finney

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web