When programming languages are being discussed on forums, one of the topics that is almost always an issue is the kind of community in which the language exists (and I am using the idea of the language existing within a community quite deliberately). I have found that many languages have quite a vibrant community where people are willing to share thoughts and ideas and are supportive of those who are learning the language.

A few weeks ago, though, I was lucky to see first hand the excellent spirit of the Python community. David Beazley, Python expert, author of SWIG, the Python Essential Reference and all round nice guy was travelling to Canberra, Australia to do some training. He offered, at no expense, to visit Melbourne and give us a sneak preview of the workshop that he will be delivering at PyCon2011. The workshop was pretty well attended for a workshop on a Saturday that was held at very short notice. The workshop was titled ‘Mastering Python 3 I/O’ and my first response was how much can we talk about I/O in Python 3 that I don’t already know. After all, we all know that print x has been replaced by print(x). Well, as it turns out, there was a lot that I don’t know. Of the almost 150 slides that we covered, I found myself taking a note or two almost every second or third slide. The talk was broken down into 8 easily digestible parts. It started with simple issues like porting from 2 to 3 (and why 2to3 cannot cope with many I/O issues), progressed to a very nice overview on Unicode (an understanding of which is important in understanding Python 3) and continued through to system interfaces and library design issues. Here are just a few of my dotpoints from the talk (I am tempted to include more, but do not want to preempt Dave’s talk at PyCon):

  • All strings are Unicode strings in Python 3.
  • Most of the Unicode issues are handled transparently.
  • 2to3 will not address many I/O issues in migration.
  • Python 3 reimplements most of the I/O stack.
  • Python 3 has introduced a new formatting model.
  • Much of this model has been backported to Python (in particular, 2.7).
  • There are potentially lots of gotchas in Python 3. Forewarned is forearmed.

I think it is a bit unfortunate that Python 3 is mentioned in the title. This talk is relevant to all Python programmers - even if you don’t intend using Python 3 for a while. If you’re attending PyCon and have a chance to attend Dave’s workshop, I can recommend it. If you don’t get a chance, hopefully the slides will be available. Finally, thanks Dave. You’re a credit to the Python community and all of us in Melbourne enjoyed your breezy Chicago style.

Note: After the conference, the slides should be available here: http://www.dabeaz.com/talks.html