This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python coding style [was Re: [RFA] New python module gdb.types]


Joel Brobecker <brobecker@adacore.com> writes:

>> My deeply biased and very personal ideology her e is if how emacs
>> handles it.
>
> I think it would be wrong to adopt that philosophy, and to be honest,
> I'm getting a little tired about having to suffer certain decisions
> purely because this is the default emacs indentation style. 

Well I did preface my comments with heavy disclaimers ;)  But I wasn't
aware this was such a controversial choice or that hackers had to suffer
for it.  FWIW I find the GNU C style somewhat hard to grok even now, after
years and using Emacs pretty consistently (with various forays to
Eclipse).  Anyway, I did not want to drag out history into the
conversation (unintentionally or not).

> I just think it's more important to be consistent
> with the rest of the Python community.
>
> There is actually an official Python Coding Style, called PEP8:
>
>     http://www.python.org/dev/peps/pep-0008/

That's great.  Good to see.

> I think we should strive to not break whatever suggestions this guide
> provides, and add some extra of our own if we feel necessary.

And I'll disagree here ;)  I think if we are striving to be consistent
with the community, adding a little of our own sauce should be a
question we should examine at least briefly. What I've read of the PEP
seems pretty comprehensive.  

> I looked at the Google Python Style Guide, and it does not conflict
> with PEP8. I also have relatively limited knowledge of Python, but
> I absolutely agree with everything in that document.

See above.

My own opinion is that we should purely not opt for one particular
flavor because there exists a vacuum.  Why not follow the PEP to the
letter? The Google guide looks sane, and really nice. But what are the
strong feelings the project should add this particular sauce over the
PEP? I just want to briefly examine those questions.

Finally I'll argue against my own point and note that Tom has mentioned
this will all work with Emacs anyway.  Maybe I am building a huge
straw-man.  But this is something that worries me a little bit.  Once
a standard is adopted (in particular a coding standard), it's usually
there forever.  

Cheers,

Phil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]