What does "Sparse is better than dense" mean? (Python Zen)
Mark McEahern
marklists at mceahern.com
Thu Jul 11 09:07:21 EDT 2002
> Although it's in the Humor section I take the Python Zen
> (http://www.python.org/doc/Humor.html#zen) quite seriously.
> However I can understand what does “Sparse is better than
> dense” means.
Here's one of my pet peeves:
if x: do_one_thing()
or:
try: foo()
except: pass
The problem with collapsing these single statement blocks into one line is
that it complicates visual scans of a block of code. It certainly doesn't
make a hill of beans difference to the compiler.
;-)
// m
-
More information about the Python-list
mailing list