Subject: Re: [RFCv3 2/4] Add Python support library for CVS remote helper

From: Johan Herland <[email-masked]>
Date: Thu, 13 Aug 2009 03:27:28 +0200

On Thursday 13 August 2009, Junio C Hamano wrote:
> David Aguilar <[email-masked]> writes:
> > This also had me wondering about the following:
> > 	git uses tabs for indentation
>
> Not relevant.  That is a rule for our "C" source code.  We also use it in
> our Perl scripts and shell scripts because there is no single "one right
> way" that is strongly defined and everybody adheres to, like the 4-space
> rule Python folks have.
>
> > BUT, the python convention is to use 4-space indents ala PEP-8
> > http://www.python.org/dev/peps/pep-0008/
> >
> > It might be appealing to when-in-Rome (Rome being Python) here
> > and do things the python way when we code in Python.
>
> Yes, this is more important.
>
> >> +		if len(msg) > 25: msg = msg[:22] + "..." # Max 25 chars long
> >> +		return "<Changeset @(%s) by %s (%s) updating %i files>" % (
> >> +			self.date, self.author, msg, len(self.revs))
> >
> > Similar to the git coding style, this might be better written:
>
> So is this one.  If experienced Python folks also frown on single-line
> conditionals, then by all means please update this.  But if this
> suggestion is solely because we don't do a single-line conditional in our
> C source code, then please do not insist on it too strongly.  The code
> should look familiar to Pythonistas with good tastes (if such a class of
> people exist, that is ;-)).

Ok. Thanks. I will follow PEP8 as closely as possible, including the 4-space 
indent.

...Johan

-- 
Johan Herland, <[email-masked]>
www.herland.net