Functional patterns for the Python maverick

Last updated: Dec 6, 2015

Learn the forbidden techniques

Are you out of touch with this functional programming jive the kids are on about? Have you ever heard someone talk about their “monads” and snickered? Do you want to get on top of the trend that has been on the verge of overtaking the world of imperative programmers for decades? Or do you just want to see if the grass is really greener?

Either way, you came to the right place. Unpythonic contains a variety of examples of functional programming with python, ranging from sensible to pants-on-head-insane. As you work your way through this series of articles, we will explore together some motivations, idioms, techniques, and patterns from the functional programming world, and apply them in Python. Not because we should, or want to, but because we can. And hopefully we’ll all learn something along the way.

The only disclaimer in the whole thing

This work assumes that you are a thinking human being with a sense of discretion. Many chapters in this book will include examples that are not really meant for use in production code, for reasons of performance, collaboration, or general insanity. The goal of this book is not to get you writing strictly-functional Python programs at your day job, unless you don’t really like your day job that much.

Rather, the goal of this writing is to introduce you to programming techniques that are outside what you might be familiar with. You will be able to think about your python programs in new ways, or recognize patterns with implementable abstractions that will make your code shorter, more logical, easier to read and understand, and generally better.

Ready to start? Good. Come right this way.