| Store | Cart

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

From: Donn Cave <d...@u.washington.edu>
12 Jul 2002 17:18:49 GMT
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.

You can do what you want, but if you're thinking of other programmers,
please don't do that.

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.

I'm not saying the standards were developed by a higher intellect
than yours or are informed by some superior rationale, but they're
inherently better than anything you can do, just because they're
how we're used to reading and writing Python.  There's some latitude
for circumstances, but the most readable code will still be the stuff
that follows the standard.

	Donn Cave, donn at u.washington.edu

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

Previous post: redirecting stdio