This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Python coding style
- From: Tom Tromey <tromey at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org
- Date: Wed, 06 Oct 2010 16:25:12 -0600
- Subject: Re: Python coding style
- References: <AANLkTikM7Sdn6-LS9psAM92HaWtdr54qKz_zUaz7Jggb@mail.gmail.com>
Doug> Can we, at least as a first pass, adopt this?
Doug> http://google-styleguide.googlecode.com/svn/trunk/pyguide.html
It is ok with me. I read through it and I thought it seemed reasonable
enough.
Can you say how it compares to PEP 8?
http://www.python.org/dev/peps/pep-0008/
They seemed basically compatible to me, but I only spent a few minutes
with each.
Since you are more familiar with it, would you mind doing a little extra
review for changes to .py files for a while? Some of the rules are
different enough from GNU C that it will take some getting used to;
e.g., the hanging indentation rule.
A couple specific exceptions:
* We shouldn't use the #!/usr/bin/env thing
* We should use FIXME instead of TODO, as the former is already gdb
practice
Phil> My deeply biased and very personal ideology her e is if how emacs
Phil> handles it.
The defaults are mostly ok. You'll need to set indent-tabs-mode to nil
in these buffers (though even this happens automatically with the
default settings).
Tom