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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ;-)).
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]