See also Andrew Kuchling’s collection of Python quotations, containing in a condensed form some sterling examples of the wit and wisdom encountered in the Python world. Special cases aren’t special enough to break the rules. 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. Although never is often better than right now.
Did not find what they wanted? Try here
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! This classic is also available in the Python interactive interpreter, just import this!
Naturally, not everyone has the same sense of humor. Would you like a lovely fluffy little white rabbit, or a cutesy wootesly little brown rabbit? Actually”, says the little girl, “I don’t think my python would notice. Shooting Yourself in the Foot There’s an endless series of jokes about how to shoot yourself in the foot using a particular programming language.
Python: You create a gun module, a gun class, a foot module and a foot class. After realising you can’t point the gun at the foot, you pass a reference to the gun to a foot object. After the foot is blown up, the gun object remains alive for eternity, ready to shoot all future feet that may happen to appear. Java: You find that Microsoft and Sun have released imcompatible class libraries both implementing Gun objects. You then find that although there are plenty of feet objects implemented in the past in many other languages, you cannot get access to one. But seeing as Java is so cool, you dont care and go around shooting anything else you can find. Microsoft reportedly is willing to stop the action if either a licensing agreement can be worked out or if Guido Van Rossum, the inventer, changes the name of the computer language and personally destroys all references to Spam, the Spanish Inquisition, and so forth, in all copies of the Python code and documentation whereever they may have propagated.