Despite yesterday’s talk of hopelessness over MIT moving it’s intro course to Python, I have no qualms about saying that Python is my favorite general purpose language. It has a neat syntax, a clean module system and lots of functionality built into the language. It’s also pretty easy to learn even if you’ve never programmed before and if you have programmed before you’ll be surprised at how much easier Python lets you get things done than a lot of other languages. There are a lot of modules out there which extend Python’s usefulness (Numpy and PyGame are the ones that most quickly come to mind). There are also bindings to cross-platform toolkits like Qt and GTK+ as well as an interface to interact with Objective-C based toolchain used by OS X. Even more interesting is Jython: a port of Python that runs on the JVM and lets you access the functionality that the Java platform offers.
Of course Python does have its share of quirks. The object system and it’s associated scoping rules take some getting used. It also uses whitespace indentation as a way to determine block nesting. It’s not something that you can’t get used to and I don’t mind it at all, but I know it drives some people mad. But let’s face it, no language is perfect and Python is really pretty good for a lot of things.
I’ve had a good time learning Python. It’s documentation is pretty good and the dynamic typing gives you a lot of flexibility which can be very empowering, especially if you come from a static language like C++ or Java. I’ve written a few Python posts in the past, but there’s still a considerable amount that I’d like to share with readers. I’ve decided to start a new series where I write articles covering slightly advanced and what I hope will be helpful Python topics. I’m not sure yet what format they’ll take on, but they will include example code, howtos, and maybe some references to similar features in other languages. You might want to bookmark this page as I’ll keep updating it with links to the new articles whenever I put them up. Here are the articles that I’ve already written and ones that I’m planning. If there is anything that you want to write about, please let me know
- A guide to Python namespaces
- Switch-case statement in Python
- Python properties vs Java Access Specifiers
- Switch-case statement in Python revisited