[SciPy-dev] Re: [Scipy-cvs] world/chaco properties.py,1.10,1.11

Perry Greenfield perry at stsci.edu
Mon Dec 2 19:28:17 CST 2002


> 
> David C. Morrill wrote:
> 
> > Sigh. I don't suppose it's allowed to disagree with a PEP is it? 
> 
> You can disagree with whoever you want. =)
> 
> > All I can
> > say is that the code follows a style that I personally am very 
> comfortable
> > with and prefer, and so, yes, it is done on purpose.
> 
> Hmm.  All I'd like to say is that it would be good if the 
> codebase was at the 
> least consistent.  As it is, it appears that Eric-authored files 
> use 4 spaces 
> and David M-authored files use 3 spaces and 4 spaces.
> 
> After looking a bit, it seems that you (David) use 3 spaces after 
> class, if 
> and in .co files, but 4 spaces after def and for statements.  It's an 
> interesting distinction which I've never seen - and I've looked 
> pretty hard at 
> common indenting behavior when desiging Komodo =).
> 
> This sort of thing will make it harder for others to contribute.
> 
> --david
> 
I'll have to agree with David Ascher on this one regarding indentation.
There really should be a standard indent for all the source code in 
the packages (and that should be 4 spaces ;-).

As for aligned assignments (I assume that's what David was referring
to) I'll take the position Tim Peters has taken, which if I recall
correctly, was that it is fine to do when the block of assignments
is very similar in nature and the variable names do not vary much
in length. For example

x    = 1
xin  = 2
xout = 4

I'm not sure the example given by David really justifies (no pun
intended) justifying. But this is an issue I'm not sure is worth
battling over and don't see it as a big deal either way. Unlike
indentation, I don't know if it should cause other contributors
to pull their hair out (and besides, if they break the alignment,
so what?)

Perry Greenfield





More information about the Scipy-dev mailing list