Monday 6 June 2016

The Zen of Python


Dear Reader,

  • 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!

Sound advice. You'd be forgiven to think this set of principles came from some dusty old philosophy manual. You'd be wrong. Believe it or not, this is an excerpt found on the FAQ page of the popular programming language, Python.



The Zen of Python is a collection of 20 software principles that influences the design of Python Programming Language. Long time Pythoneer Tim Peters succinctly channels the guiding principles for Python's design into 20 aphorisms, only 19 of which have been written down. The 20th is left to your imagination.

The whole story behind Python is rather playful and whimsical.  Guido van Rossum, the Dutch founder of the language, gave Python its name because he was reading the published scripts from Monty Python Flying Circus!  Van Rossum was looking for a name that was short, unique, and mysterious, so he decided to call the language Python. Oh, and he developed the programming language during the Christmas holidays because he had nothing better to do.

Python is based on the English language - focused on simplicity. If C, C++ or Java would take 20 lines to implement something, Python takes around 3 - 4 lines to achieve the same thing. No weird symbols for simple code or variables, no need for semi colons, and code is always nicely spaced. Python enforces clean, structured programming techniques and borrows freely from other languages.  It doesn't enforce a single model or approach to solving a problem (so Zen-like!).

No wonder Python is snaking it's way into programmers hearts -- It is currently the second most popular programming language globally, after Java, and used by the likes of NYSE and Google.

Imarticus Learning offers online python certification. This is 100%  Career Assistance program, our team provides a rigorous industry mentoring process that is customised to your needs. Additionally, the team conducts interview preparation sessions, resume building workshops, 1-1 mock interviews while also providing you access to our extensive corporate network and recruitment teams.

By Zenobia - Imarticus Team

No comments:

Post a Comment