Simon Willison’s Weblog


“Getting” Python

8th October 2003

David Brown: Python is a time bomb (in a good way):

Python is a time bomb. I’ve yet to see someone run with it the first time they are exposed to it. We all know the drill. “Indenting for block structure?” “Why should I use Python when I can do all that in Perl?” and the ever popular “Scripting languages are not for serious programs.”

But then, because you’re curious, you start using it. The first thing you notice is that (if you had good formatting habits to begin with) the indenting issue goes away. You were going to do it that way anyway, right? Then you notice that you got the job done in less time than you realized it would take. Personally, that’s my favorite bit. The “It’s done already? And it works?” feeling. I love it.

I’ve had that “It’s done already?” several times over the past few days. It’s actually quite disconcerting—you flesh out a code idea, run it... and it works. And it’s finished. And it’s generally in good enough shape to be used as-is. I think part of the reason is that I constantly have the interactive prompt open to try out code snippets, so most of the syntax errors and misunderstandings about how a language feature work have been dealt with before I even commit a line of code to my text editor.

This is “Getting” Python by Simon Willison, posted on 8th October 2003.

Next: Firebird URL shortcut tips

Previous: Python snippet: ordinalth(n)

Previously hosted at