

def read_directive(self, directive, *arguments):
    'Read a parsed directive and add it to the current instance'
    try:
        {
            'define': self._add_definition,
            'start': self._add_entry_command,
            'stop': self._add_exit_command,
            'watch': self._add_watch,
            'watch-final': self._add_final_watch,
        }[directive](*arguments)
    except KeyError:
        print("Unknown directive '{}'".format(directive))
        raise

dataset/ETHPy150Open borntyping/spotter/spotter/watches.py WatchFile.read_directive/original