Re: [RFCv3 2/4] Add Python support library for CVS remote helper
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 13, 2009, 00:55 UTC
- Message-ID
- <7vzla4r0qc.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090812021017.GB62301@gmail.com>
David Aguilar <davvid@gmail.com> 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.
Show 5 quoted lines
> 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.
Show 5 quoted lines
>> + 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 ;-)).