For much of my professional career I’ve found myself in a state of gentle rivalry with the Python programming language and its practitioners. But a visit to PyCon—the preeminent conference on Python—has given me a much deeper appreciation for the language and its community.
When I was starting my first programming job, I had to learn Perl, the first interpreted language I had come across. I loved the flexibility of Perl—its expressiveness and its conciseness—and It was shortly after I started with it that I remember hearing of Python for the first time. I attended the YAPC:Europe conference in 2000 (the European “Yet Another Perl Conference”), and saw Nat Torkington deliver a blistering satire on all that was wrong with Python. And that was it: the die was cast. I found myself in a camp that was in de facto opposition to Python.
In the years that followed I was aware that Python was growing in popularity, even as Perl waned, and that it was a highly capable, usable language. But I still never tried it out. Instead, I ended up moving toward Ruby, which more and more came to take the place of Perl as Python’s friendly rival, and also as my language of choice. Ruby had an elegance and intuitiveness which I found made programming a joy.
So when I came to join Safari—as I knew, a Python-centric company—I was slightly worried that I was stepping from a bejewelled cave of Perls and Rubies into a veritable snakepit.
And Python was fine. It was straightforward to pick up, and worked well. It was relatively concise, and had powerful libraries to do really cool stuff (I’m mostly working on text-based machine learning, at which Python is extremely capable). Still, even after months of getting to know the language, while I felt I could appreciate it, it wasn’t like I actively enjoyed working with Python.
It was in this context that I went to PyCon 2015 in the great city of Montréal. I knew this would be an opportunity to improve my Python skills, but, more importantly, I hoped it would be my way into understanding what made Python so popular.
Digging into the Python Language
One of my first stops was Matt Harrison’s tutorial on Intermediate Python. In Ruby, I really liked the closures and code blocks, and Ruby’s ability to chain maps and filters and injects. Python can do all that stuff, but it just chooses to do them differently. Harrison broke down some of Python’s cooler features, such as Decorators, Generator Expressions and Context Managers, showing how to create them and when to use them. Honestly, this may have been the first time I felt a frisson of excitement about Python as a language — it really made me want to go out and play with these advanced features.
While that talk showed some of Python’s more powerful language features, in contrast Amy Hanlon’s talk “Investigating Python Wats” highlighted some of its quirks and pitfalls, those times where it behaves apparently inexplicably and you just exclaim “WAT?” Now you may think this would just reinforce my scepticism of the language, but no. Every language has its gotchas and inconsistencies, and understanding not just what they are but why they arise—as Hanlon ably did—can really help get at the heart of a language. Plus one has to care about a language to dig into its quirks and that enthusiasm is often infectious.
Infectious enthusiasm was even more evident in Allison Kaptur’s two talks. “Exploring is never boring”, Kaptur says; you don’t have to understand Python’s bytecode, or understand the source code of its interpreter, called CPython, to be a good Python programmer. But you should do those things if you are curious about them and you find them fun. In her first talk she demonstrated how looking at the bytecode can reveal a lot about the Python language; and in her second she demonstrated some techniques for digging around in CPython’s source code to better understand what it’s doing. These talks had the potential to be incredibly dry but both were fascinating and engaging.
Raymond Hettinger is a contributor to CPython’s source code, and he spoke about one of Python’s more mind-bending features in his talk “Super considered super!” The function ‘super’ behaves differently in Python than in most other languages, and is both powerful and complex, but Hettinger brought it to life with vim and gusto.
Seeing all these great presentations about the powerful features of Python, I understand what makes it such a popular language, and now feel a genuine excitement about programming in Python: finally, I get it.
Guido van Rossum Keynote
The person ultimately responsible for all that bytecode and the CPython interpreter it is Guido van Rossum, Python’s creator. Last time I saw Guido he was up on stage at OSCON 2004 putting a custard pie in Dan Sugalski’s face, after the latter had lost a bet made the previous year. Well, a long time has passed since that custard pie, and Python has gone from strength to strength in the intervening decade. Guido is still in charge of Python, and was, therefore, one of the most anticipated keynote speakers. During his talk, he commented on the high number of women at the conference and who program in Python, but he lamented that there were no women developing the core Python implementation. Wearing a PyLadies t-shirt, he issued a call for two women to be working on it within the year, and offered to train them himself if necessary.
I was heartened by this call for greater equality and diversity from a figure as prominent as van Rossum. Personally, I think this was already the most gender diverse technology conference I have attended (quite possibly the most ethnically diverse too).
Happy to consistently have to wait in line for the women’s room at #pycon. Never happened at a large dev event for me before.
— Liza Daly (@liza) April 10, 2015
And, for a different type of diversity, there were more Linux laptops than you see at the Open Source Convention (OSCON), which has a certain notoriety for the number of Apple Laptops that are on display.
And that made me realise something. Unlike with Ruby, I’d never loved Perl as a language. There were bits of it I loved, but the object orientation implementation was cumbersome and unintuitive, and I always found the variable-prefixing sigils ugly. No, what I miss about Perl was not writing Perl, it was the community of Perl. It was the wonderful cast of characters that charmed me with their sheer enthusiasm for their quirky language and the surprising and delighting things you can do with it. At PyCon 2015 I was getting to see the Python community for the first time, and it was friendly, and diverse, and enthusiastic.
While I still love the elegance of Ruby, and miss the culture of Perl, I returned from PyCon 2015 with a totally reinvigorated outlook on Python — a newfound enthusiasm for both the language and its community.
 An “interpreted language” is one which is distributed as code, which is then run by an interpreter. Conversely “compiled languages”, like C and Java, are compiled before being distributed. Typically, interpreted languages are considered to be more flexible and compiled languages are thought to be less error-prone.
 A talk so acerbically scandalous that it is no longer to be found on the web.
 Just to be clear, this “opposition” was, and was universally understood to be, more in the nature of a friendly rivalry, not a blood feud — we knew to save that level of hostility for Java or PHP.
 Well, to be honest, I was excited to learn a new language, and I also knew that Python had more in common with the languages I knew than it had differences, so I wasn’t really worried.
 When running a Python program, the code you write is first turned into ‘bytecode’, which is then executed by the interpreter.
 Sugalski bet that Parrot, his new virtual machine built to run the recently announced Perl 6, could run Python bytecode faster than van Rossum’s CPython interpreter — this bet was was nicknamed the “Pie-thon Challenge”.