class Dispatcher:
    cmds = {}

    def reg(self, cmd, fn):
        cmds[cmd] = fn

    def run(self):
        while True:
            cmd = input('plz input your command: ').strip()
            if cmd == 'quit':
                return
            self.cmds.get(cmd, self.defaultfn)()

    def defaultfn(self):
        print('Unknown Commands.')

72e506fbf60d4ae6315cd16b59a6be2b109142e1
class Dispatcher:
    <mask token>
    <mask token>
    <mask token>
    <mask token>

class Dispatcher:
    <mask token>
    <mask token>

    def run(self):
        while True:
            cmd = input('plz input your command: ').strip()
            if cmd == 'quit':
                return
            self.cmds.get(cmd, self.defaultfn)()

    def defaultfn(self):
        print('Unknown Commands.')

class Dispatcher:
    <mask token>

    def reg(self, cmd, fn):
        cmds[cmd] = fn

    def run(self):
        while True:
            cmd = input('plz input your command: ').strip()
            if cmd == 'quit':
                return
            self.cmds.get(cmd, self.defaultfn)()

    def defaultfn(self):
        print('Unknown Commands.')

class Dispatcher:
    cmds = {}

    def reg(self, cmd, fn):
        cmds[cmd] = fn

    def run(self):
        while True:
            cmd = input('plz input your command: ').strip()
            if cmd == 'quit':
                return
            self.cmds.get(cmd, self.defaultfn)()

    def defaultfn(self):
        print('Unknown Commands.')
