Re: PEP 8 style enforcing program



montyphyton@xxxxxxxxx schrieb:
Some recent posts about Python programming style got me thinking.
Since we have the PEP 8 which gives some guidelines about the style to
be used, do we have any program that can check for violations of these
guidelines within the source code? I understand that there are a lot
of code beautifiers out there, but i haven't seen one specially
tailored for Python... Is there even a desire in Python community for
a program like this (by Python community I mean the people in this
group:) ) ? I think it would be a nice little project for practice and
I'd like to do it, but if there is already something like this then I
can probably spend my time on something more productive. So, I'd like
to hear your opinion on this...
There is one thing that I don't understand about PEP 8 - why is using
spaces considered more desirable than using tabs for indentation?


Pylint is one of them (http://www.logilab.org/857)

With spaces you get always the same len of the line, where tabs can use 2,4,8 spaces, dependingt on the settings of the IDE

Alexander
.



Relevant Pages

  • Re: ten small Python programs
    ... Though the code should probably follow PEP 8 guidelines, ... PEP 8 used to allow either camelCase or under_scores. ... Of course, for new code, such as that in this thread, there's no reason to break from the PEP 8 guidelines. ...
    (comp.lang.python)
  • Re: PyAtom, a Python module for creating Atom syndication feeds
    ... I have edited PyAtom, and now it should be in better conformance with the ... PEP 8 guidelines. ...
    (comp.lang.python)