Donn Cave wrote:
> Quoth eddie at holyrood.ed.ac.uk (Eddie Corns):> ...> | Basically, when you layout code you need to think about how to convey to the> | reader what's going on. In constructions like the above I believe it's much> | easier to see that it's only ever looking at the beginning of the line and the> | table like structure makes it easy to map what it finds to what gets done.>> Don't try to come up with nifty ways to convey to the reader what's> going on. Read the coding standards in PEP 8, and follow them to> the letter. You can't do better.
"...to the letter." This strikes me as a "foolish consistency."
I think the standard is good overall but what makes it best is it acknowledges up
front that there's some room for personal judgment and common sense. Among adults I
expect we all can accommodate a little flexibility in following these rules. So to
some extent, I regard interpreting it "to the letter" to be inconsistent with how
the PEP is written.
My particular problem is that some of the express rules about horizontal white space
actually hinder readability. As Mr. Corns points out, some sections of code are
inherently tabular and I agree that presenting them in tabular format is the
clearest way to format the code. You simply cannot argue that the extra white space
obscures the meaning because it obviously adds clarity. You could argue that it
doesn't help a lot or that it IS a bit more tedious to maintain. (Of course part of
the maintenance problem is a direct consequence of Fearless Leader's treasonous
reversal of position on horizontal tabs.) But from a readability standpoint, it is
a superior (and harmless) deviation from the standard.
I'll concede that most deviations from the standards do hinder readability.
Overall, it's a pretty good standard. But it's not perfect and horizontal white
space is one place where, BDFL's personal biases notwithstanding, the standard is
overly specific. I guess the trouble it that the nature of the language
intrinsically avoids so many of the important battles that we're left to quibble
about secondary and tertiary matters.
Of course, I come from a far away land, where Python is but one tool among many on
the work bench, rather than some kind of a religion.
James J. Besemer 503-280-0838 voice
http://cascade-sys.com 503-280-0375 fax
mailto:jb at cascade-sys.com