

def add_handlers(self, host_pattern, host_handlers):
    'Appends the given handlers to our handler list.\n\n        Host patterns are processed sequentially in the order they were\n        added. All matching patterns will be considered.\n        '
    if (not host_pattern.endswith('$')):
        host_pattern += '$'
    handlers = []
    if (self.handlers and (self.handlers[(- 1)][0].pattern == '.*$')):
        self.handlers.insert((- 1), (re.compile(host_pattern), handlers))
    else:
        self.handlers.append((re.compile(host_pattern), handlers))
    for spec in host_handlers:
        if isinstance(spec, (tuple, list)):
            assert (len(spec) in (2, 3, 4))
            spec = URLSpec(*spec)
        handlers.append(spec)
        if handlers.name:
            if (spec.name in self.named_handlers):
                app_log.warning('Multiple handlers named %s; replacing previous value', spec.name)
            self.named_handlers[spec.name] = spec

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py Application.add_handlers/VarMisuse@168/253 `spec`->`handlers`