Geek Culture
Published in

Geek Culture

Chain of responsibility pattern in Python

Decoupling complex decision chains.

Photo by Edge2Edge Media on Unsplash

Chain of responsibility is a behavioural design pattern. It is used to process command objects, where different types of command objects might need to be processed in different ways.

It does this by allowing for multiple handler objects, each capable of handling a specific type of command and rejecting other commands. The command…




A new tech publication by Start it up (

Recommended from Medium

Writing Integration Tests — Part II

Halloween Hackathon!

Journey into GSoC — Part

Max Facts: Routing Max into Processing Using OSC

Welcoming FhaeLin to Main Menu!

Using Open Source Tools at Your Company

Introduction to K8s at D11s (w/o yaml)

Should C# Be Used Together With .NET?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Martin McBride

Martin McBride

Software developer. Java, Python, C++ etc. I write for and maintain the generativepy library.

More from Medium

Functional Programming in Python | Easy Learning

The Single Responsibility Principle Explained in Python

Fixtures in pytest: All You Need to Know

How to Optimise Python Performance