FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub Viewer

#!/usr/bin/env python # -*- coding: utf-8 -*- """http://www.testingperspective.com/wiki/doku.php/collaboration/chetan/designpatternsinpython/chain-of-responsibilitypattern""" class Handler: def __init__(self): self._successor = None def successor(self, successor): self._successor = successor def handle(self, request): raise NotImplementedError('Must provide implementation in subclass.') class ConcreteHandler1(Handler): def handle(self, request): if 0 < request

Back | FazBrowse Home | New Git URL