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

Management by Objectives (MBO) — Evaluation

ICLAB Lab03 Note

Deploy your Django App to Heroku with PostgreSQL

AWSome day

Experiences — Andela Day 4

Code Dreams

Crackme Challenge: PleaseCrackMe

Technical hangover

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

Abstract Factory design pattern in Python

The Open-Closed Principle Explained in Python

Python Enums — How you should be using them.

Python Doctest and Unittest