On Thursday I went to a Python users group at Google. It was “noobies” night and the main attraction was a talk given by Alex Martelli (More python stuff). He is the author of Python in a nutshell and now works for Google.

His talk was an introduction to Python and it reminded me of some things that had initially attracted me to the language. There where several Oh yeah, now I remember moments. One in particular was when Alex showed us the Dir() function. Dir() lists out all the members of a particular class or module. This includes any built-in or special functions as well as anything the class inherits. Another nice thing about Python is that it is really self documenting. Every module, class or function can, and should, have a doc string. This allows you to generate documentation for your code very easily. It also allows the Help() command to show the doc string for any modules in Python’s path variable when using the Python shell.

Something else Alex explained is that everything in Python is an object, EVERYTHING. You can sling functions around like in LISP and Javascript and you can subclass just about everything. I think the only things you can’t mess with are operators (>> + - % etc) like you can in c++.

The last thing that I took away from the talk was his mention of the Wing IDE. I had found this on my own about a year ago but never really tried it out. Well I downloaded the personal version, a trial that expires in 14 days or so, and it’s going to be way worth the 35 bucks. It’s a true IDE with built in debugging, an interpreter for quick tinkering as well as everything else you would expect like good syntax highlighting, a function selector, projects and debugging tools. The only thing I have not found is code folding.


Comments

You must be logged in to post a comment.

Name (required)

Email (required)

Website

Speak your mind