Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Like I have time for this

Blog Authors:  Dan Sickles  

Previous |  Main  | Next

The Zen of Python

Dan Sickles  |    |  Tags:  languages python  |  Comments (0)
 I've used Python as my general-purpose "just get it done" language for almost 8 years. The guiding principles for Python's design are applicable to most design and development tasks. Not everyone agrees with all of these principles. For example, Perl and Ruby have a philosophy of "more than one way to do it". Choose what suits you. Python suits me. I use it extensively for Notes DB Admin type tasks; sometimes from my script library and sometimes ad hoc on the command line. You can do this with Ruby, Groovy  and other languages using the COM APIs (yes Groovy can do COM). You can do it on the JVM with Rhino, Jython, JRuby, Goovy and a host of other JVM languages. Herewith, The Zen of Python, which by the way is accessible from within Python by typing "import this":

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!



Comments

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.