[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Style Guide for Python Code
From: Matthew Woehlke <matthew.woehlke () kitware ! com>
Date: 2013-05-31 20:07:36
Message-ID: koavu3$vls$1 () ger ! gmane ! org
[Download RAW message or body]
On 2013-05-31 14:03, Philipp A. wrote:
> 2013/5/31 J. Pablo MartÃn Cobos <goinnn@gmail.com>
>> PEP-0008 says 80. The PEP-0008 rules are not to carry out the 100% of the
>> times. If you could understand better with 100 chars... this line can have
>> 100 chars of course.
>>
>> But by default I think that we should obey to PEP-0008
>
> this is a farce. if we're going to introduce standards, we should also have
> the chance to remotely follow them. we discuss here about standards that
> suit us all, and Gerald already said that he'd settle for more than 80
> chars. 80 is respected nowhere in our codebase. so we either have to redo
> everything or use this to discuss a more usable rule since obviously no one
> uses 80 or less. pep8.py has the max line length configurable for a reason:
> it's not 2001 anymore. screens are wider.
However, reasons to limit line length have not gone away just because
screens are bigger. And at least one reason is not going to go away any
time soon; human brains just don't process really long lines of text as
well. That's why newspapers have columns. (Also the uncommonality of
long lines leads to code density aesthetic deficiencies.)
That said, ISTR somewhere that KDE's policy is 120. I'm not proposing to
change that, just saying that I don't agree with the "it's not <insert
year> anymore" argument :-).
> 2013/5/31 Matthew Woehlke <matthew.woehlke@kitware.com>
>> Personally I don't want trailing space anywhere, even if it is
>> "indentation". Please don't get rid of the option to have katepart remove
>> this for me.
>
> you can turn on highlighting of trailing whitespace only. i've no single
> space of trailing whitespace anywhere in any of my python files due to this
> feature of kate.
Did I misunderstand what you meant by "the bug is fixed that kate
and pep8.py identifies empty indented lines as 'trailing whitespace'"?
As I understood it, you are saying that this should not be flagged
(complained about by pep8, removed by katepart's 'remove trailing
whitespace', or otherwise highlighted by katepart):
def foo:$
print 'hello, world!'$
$ <-- nothing to see here!
pass$
...but this would still be an 'error':
def bar: $ <-- trailing whitespace
pass$
IOW, a line containing *only* whitespace equal to the indent level of
surrounding code would be okay.
I can accept that someone might want to differentiate in that manner.
(Personally, I don't; AFAIAC a newline should never be preceded by other
whitespace, period.)
--
Matthew
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic