Acknowledgments

As I write this fifth edition of this book in 2013, it’s difficult to not be somewhat retrospective. I have now been using and promoting Python for 21 years, writing books about it for 18, and teaching live classes on it for 16. Despite the passage of time, I’m still regularly amazed at how successful Python has been—in ways that most of us could not possibly have imagined in the early 1990s. So at the risk of sounding like a hopelessly self-absorbed author, I hope you’ll pardon a few closing words of history and gratitude here.

The Backstory

My own Python history predates both Python 1.0 and the Web (and goes back to a time when an install meant fetching email messages, concatenating, decoding, and hoping it all somehow worked). When I first discovered Python as a frustrated C++ software developer in 1992, I had no idea what an impact it would have on the next two decades of my life. Two years after writing the first edition of Programming Python in 1995 for Python 1.3, I began traveling around the country and world teaching Python to beginners and experts. Since finishing the first edition of Learning Python in 1999, I’ve been an independent Python trainer and writer, thanks in part to Python’s phenomenal growth in popularity.

Here’s the damage so far. I’ve now written 13 Python books (5 of this, and 4 of two others), which have together sold some 400,000 units by my data. I’ve also been teaching Python for over a decade and a half; have taught some 260 Python training sessions in the U.S., Europe, Canada, and Mexico; and have met roughly 4,000 students along the way. Besides propelling me toward frequent flyer utopia, these classes helped me refine this text and my other Python books. Teaching honed the books, and vice versa, with the net result that my books closely parallel what happens in my classes, and can serve as a viable alternative to them.

As for Python itself, in recent years it has grown to become one of the top 5 to 10 most widely used programming languages in the world (depending on which source you cite and when you cite it). Because we’ll be exploring Python’s status in the first chapter of this book, I’ll defer the rest of this story until then.

Python Thanks

Because teaching teaches teachers to teach, this book owes much to my live classes. I’d like to thank all the students who have participated in my courses during the last 16 years. Along with changes in Python itself, your feedback played a major role in shaping this text; there’s nothing quite as instructive as watching 4,000 people repeat the same beginner mistakes live and in person! This book’s recent editions owe their training-based changes primarily to recent classes, though every class held since 1997 has in some way helped refine this book. I’d like to thank clients who hosted classes in Dublin, Mexico City, Barcelona, London, Edmonton, and Puerto Rico; such experiences have been one of my career’s most lasting rewards.

Because writing teaches writers to write, this book also owes much to its audience. I want to thank the countless readers who took time to offer suggestions over the last 18 years, both online and in person. Your feedback has also been vital to this book’s evolution and a substantial factor in its success, a benefit that seems inherent in the open source world. Reader comments have run the gamut from “You should be banned from writing books” to “God bless you for writing this book”; if consensus is possible in such matters it probably lies somewhere between these two, though to borrow a line from Tolkien: the book is still too short.

I’d also like to express my gratitude to everyone who played a part in this book’s production. To all those who have helped make this book a solid product over the years—including its editors, formatters, marketers, technical reviewers, and more. And to O’Reilly for giving me a chance to work on 13 book projects; it’s been net fun (and only feels a little like the movie Groundhog Day).

Additional thanks is due to the entire Python community; like most open source systems, Python is the product of many unsung efforts. It’s been my privilege to watch Python grow from a new kid on the scripting languages block to a widely used tool, deployed in some fashion by almost every organization writing software. Technical disagreements aside, that’s been an exciting endeavor to be a part of.

I also want to thank my original editor at O’Reilly, the late Frank Willison. This book was largely Frank’s idea. He had a profound impact on both my career and the success of Python when it was new, a legacy that I remember each time I’m tempted to misuse the word “only.”

Personal Thanks

Finally, a few more personal notes of thanks. To the late Carl Sagan, for inspiring an 18-year-old kid from Wisconsin. To my Mother, for courage. To my siblings, for the truths to be found in museum peanuts. To the book The Shallows, for a much-needed wakeup call.

To my son Michael and daughters Samantha and Roxanne, for who you are. I’m not quite sure when you grew up, but I’m proud of how you did, and look forward to seeing where life takes you next.

And to my wife Vera, for patience, proofing, Diet Cokes, and pretzels. I’m glad I finally found you. I don’t know what the next 50 years hold, but I do know that I hope to spend all of them holding you.

Mark Lutz, Amongst the Larch, Spring 2013