| Store | Cart

What does "Sparse is better than dense" mean? (Python Zen)

From: Donn Cave <d...@drizzle.com>
Sat, 13 Jul 2002 07:26:28 -0000
Quoth "James J. Besemer" <jb at cascade-sys.com>:
...
"...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.

I don't propose to take any action against people who deviate from it,
and in fact I probably do so myself.  But the problem with that is
that everyone has an opinion, and it's always good judgement and common
sense, to the one who holds it.

We can say "follow the standard", or we can say "follow the standard
unless you have some other idea."  If you have a good way for people
to tell the difference between their own personal idiosyncrasies and
a really good idea that really deserves to be an exception, that
would be interesting.

| My particular problem is that some of the express rules about horizontal
| white space actually hinder readability.  As Mr. Corns points out,
...
| But from a readability standpoint, it is a superior (and harmless) deviation
| from the standard.

This is really my point.  There are two ways of looking at it.  If you
evaluate the standard from first principles, you can certainly argue that
there may be superior alternatives.  But a standard style actually creates
its own advantage, assuming that it's widely used.  Once a coding style has
really become standard, deviations from it will tend to be less readable
for most of the people who are used to that standard, and it makes no
difference if the deviations are in principle superior.  Looking at it
that way, there really is no such thing as a superior deviation from the
standard, it's a contradiction in terms.

I'm accommodating a little flexibility, just don't try to tell me the
the result will be more readable.  It won't be.

	Donn Cave, donn at drizzle.com

By the way, speaking of style - you may not have noticed that you
formatted your post to 84 columns.  75 or less would be nice.  I
reformatted for you.

Recent Messages in this Thread
Alex Martelli Jul 11, 2002 02:28 pm
Martijn Faassen Jul 11, 2002 04:54 pm
Alex Martelli Jul 11, 2002 08:28 pm
Donn Cave Jul 11, 2002 09:17 pm
James J. Besemer Jul 12, 2002 05:43 am
Eddie Corns Jul 12, 2002 02:40 pm
Donn Cave Jul 12, 2002 05:18 pm
James J. Besemer Jul 13, 2002 06:01 am
Donn Cave Jul 13, 2002 07:26 am
James J. Besemer Jul 13, 2002 10:34 am
Michael Hudson Jul 15, 2002 02:47 pm
Aahz Jul 13, 2002 03:28 pm
Alex Martelli Jul 12, 2002 07:33 am
James J. Besemer Jul 12, 2002 08:33 am
Messages in this thread