design pattern quick reference class abstractvisitor(object)__metaclass__ abc abcmeta @abc abstractmethod def visit(selfelement)raise notimplementederror(" visitor need to define visit method"class concretevisitable(visitable)def __init__(self)pass class concretevisitor(abstractvisitor)def visit(selfelement)pass model-view-controller mvc py import sys class genericcontroller(object)def __init__(self)self model genericmodel(self view genericview(def handle(selfrequest)data self model get_data(requestself view generate_response(dataclass genericmodel(object)def __init__(self)pass def get_data(selfrequest)return {'request'request