On Christmas Day 1999 I sat down to write my first piece of software in Python. My experience seems to be typical for Python users. I was initially surprised that indentation was significant, it felt scary to not define variables and I was hesitant to use a dynamic language to make serious software. However, in no time at all these worries were gone and I noticed I wrote code faster than ever. 18 months later a friend hired me to his start-up to help him write a content management system and I ended up in the enviable position of being a full time Python developer. I don’t even mention other languages on my CV anymore, because I don’t want to use them. I’ve become a full fledged, fanatic, Pythonista.
I got interested in Python 3 at EuroPython 2007 in lovely Vilnius. Guido van Rossum’s keynote was about the upcoming changes in Python 3 and although he emphatically said that you could not run the same code under Python 2 and Python 3, I couldn’t see many reasons why it couldn’t be done, considering the forward compatibility that was planned for Python 2.6. So I started looking at the differences between Python 2 and Python 3 and tried to find out how to write code that would run under both versions and learned a whole lot about Python on the way.
Most surprising was how little the fundamentals have changed. Writing code with Python 3 still feels just like the old comfortable shoes, but newly shined and with new laces. The hardest change to get used to is to remember that print is a function. The relatively small differences don’t necessarily mean that supporting Python 3 is easy, but it can be and hopefully this book will make it even easier.