On Wed, 10 Jun 2015 22:43:38 -0700
Zac Medico <[email protected]> wrote:
> On 06/10/2015 10:39 PM, Mike Frysinger wrote:
> > On 10 Jun 2015 11:54, Zac Medico wrote:
> >> On 05/30/2015 01:59 PM, Mike Frysinger wrote:
> >> LGTM, except this one line is indented with spaces instead of tabs
> >> in vartree.py:
> >>
> >>> def tar_contents(contents, root, tar, protect=None,
> >>> onProgress=None,
> >>> - xattr=False):
> >>> + xattrs=False):
> >
> > i don't know if we have a standard here. sometimes it's a single
> > tab, sometimes it's spaces to line up. i prefer the latter as
> > that's generally what PEP8 does. -mike
> >
>
> Ah, ok. The test pass, so guess it's fine that way.
But I still don't like it being mixed. It may not be a problem due to
it being contained inside the def statement. But I've had some strange
results when code is run with mixed spaces/tabs indents.
Portage code is not nearly pep8 and we have not set pep8 as a standard
for us to adhere to. Although, I personally try to keep my stuff close
to pep8. Aside from the fact I prefer a few things different than that
standard.
In this case, it is minor, but 1 tab indent (which is normal) also does
not show the continuation of the def readily. I have at times just
given it an additional indent tab to differentiate it from the following
code. I personally don't adhere to the line up all params with the
foo(param1,
param2)
It's fine when it is close to the left side, but when the
start ( is near the right side, it can be down right
impossible to stay within the 80 col. limit for long
parameters. Besides the often times wasted space of having
all params on separate lines. IMHO it can take away from
readability at times while increasing readability for complex
function calls.
I've come across code in portage with both a mix of tabs and
spaces on the same line(s)... In such cases, I have my editor convert
all leading spaces to tabs. I don't look for odd cases like the above.
But I will usually take note of them in the commit diff while making the
commit.
Personally, I'd prefer you stay with tabs, even if it does not
line up exactly with the ( ignoring personal preferences for
tab settings ( 1 tab = 4 spaces,...)
Yes, I very much like the code being centralized in one place. :)
We can look at any more convention changes after the next
lead election.
--
Brian Dolbec <dolsen>