Beware complexity

Harald Massa cpl.19.ghum at spamgourmet.com
Sun Mar 13 03:26:07 EST 2005


Philip,

more often than not, all needed was included in Python years ago. 

Especially:

> I wonder if anyone has any thoughts not on where Python should go but
> where it should stop?

The answer is included within the standard library. On any Python command 
prompt type:

>>>import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

> Nothing wrong with coding conventions of course unless you:
 
So "coding conventions" are more or less rendered as something of ancient 
times; Python has its Zen. (of course, as I said, included in the 
standard library)

And: the fear that Python gets extended over sensible bounds maybe real. 
But: Just have a look within python.devel, what happens on any (pun 
intended) extension to builtins: It's a gentle and polite, nontheless 
strong and hard discussion; a real evolutionary survival test.

Python is a healthy tree: it grows. But Guido and the Bots are 
thoughtfull gardeneres: they are not afraid to cut bad branches.

Harald



More information about the Python-list mailing list