On Thursday 13 August 2009, Junio C Hamano wrote: > David Aguilar <davvid@xxxxxxxxx> 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, <johan@xxxxxxxxxxx> www.herland.net -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html