def new_style(self, config):
    'Install a new (stacked) parser style.\n\n        This feature is currently experimental but should mimic the\n        previous behaviour with regard to TAG_STYLE, START_TAG, END_TAG,\n        etc.\n        '
    if self.style:
        style = self.style[(- 1)]
    else:
        style = DEFAULT_STYLE
    style = style.copy()
    tagstyle = config.get('TAG_STYLE')
    if tagstyle:
        tags = TAG_STYLE.get(tagstyle)
        if (tags is None):
            raise Error(('Invalid tag style: %s' % tagstyle))
        (start, end) = tags
        config['START_TAG'] = config.get('START_TAG', start)
        config['END_TAG'] = config.get('END_TAG', end)
    for key in DEFAULT_STYLE.keys():
        value = config.get(key)
        if (value is not None):
            style[key] = value
    self.style.append(style)
    return style
Install a new (stacked) parser style.

This feature is currently experimental but should mimic the
previous behaviour with regard to TAG_STYLE, START_TAG, END_TAG,
etc.
def new_style(self, config):
    'Install a new (stacked) parser style.\n\n        This feature is currently experimental but should mimic the\n        previous behaviour with regard to TAG_STYLE, START_TAG, END_TAG,\n        etc.\n        '
    if self.style:
        style = self.style[(- 1)]
    else:
        style = DEFAULT_STYLE
    style = style.copy()
    tagstyle = config.get('TAG_STYLE')
    if tagstyle:
        tags = TAG_STYLE.get(tagstyle)
        if (tags is None):
            raise Error(('Invalid tag style: %s' % tagstyle))
        (start, end) = tags
        config['START_TAG'] = config.get('START_TAG', start)
        config['END_TAG'] = config.get('END_TAG', end)
    for key in DEFAULT_STYLE.keys():
        value = config.get(key)
        if (value is not None):
            style[key] = value
    self.style.append(style)
    return style