public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Doug Evans <dje@google.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: Python coding style
Date: Wed, 06 Oct 2010 22:25:00 -0000	[thread overview]
Message-ID: <m362xf2c3b.fsf@fleche.redhat.com> (raw)
In-Reply-To: <AANLkTikM7Sdn6-LS9psAM92HaWtdr54qKz_zUaz7Jggb@mail.gmail.com>	(Doug Evans's message of "Wed, 6 Oct 2010 14:20:53 -0700")

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

  parent reply	other threads:[~2010-10-06 22:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 21:21 Python coding style [was Re: [RFA] New python module gdb.types] Doug Evans
2010-10-06 21:37 ` Phil Muldoon
2010-10-06 22:23   ` Joel Brobecker
2010-10-07  8:01     ` Phil Muldoon
2010-10-08 15:17       ` Joel Brobecker
2010-10-06 22:25 ` Tom Tromey [this message]
2010-10-08 21:20   ` Python coding style Doug Evans
2010-10-08 21:35     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m362xf2c3b.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).