(self, attr)
Resolve a sugary or plain capability name, color, or compound
        formatting function name into a callable capability.

        Return a ``ParametrizingString`` or a ``FormattingString``.
Resolve a sugary or plain capability name, color, or compound
        formatting function name into a callable capability.
Resolve a sugary or plain capability name color or compound formatting function name into a callable capability .
def _resolve_formatter(self, attr):
        """Resolve a sugary or plain capability name, color, or compound
        formatting function name into a callable capability.

        Return a ``ParametrizingString`` or a ``FormattingString``.

        """
        if attr in COLORS:
            return self._resolve_color(attr)
        elif attr in COMPOUNDABLES:
            # Bold, underline, or something that takes no parameters
            return self._formatting_string(self._resolve_capability(attr))
        else:
            formatters = split_into_formatters(attr)
            if all(f in COMPOUNDABLES for f in formatters):
                # It's a compound formatter, like "bold_green_on_red". Future
                # optimization: combine all formatting into a single escape
                # sequence.
                return self._formatting_string(
                    u''.join(self._resolve_formatter(s) for s in formatters))
            else:
                return ParametrizingString(self._resolve_capability(attr))
def _resolve_formatter ( self , attr ) : if attr in COLORS : return self . _resolve_color ( attr ) elif attr in COMPOUNDABLES : # Bold, underline, or something that takes no parameters return self . _formatting_string ( self . _resolve_capability ( attr ) ) else : formatters = split_into_formatters ( attr ) if all ( f in COMPOUNDABLES for f in formatters ) : # It's a compound formatter, like "bold_green_on_red". Future # optimization: combine all formatting into a single escape # sequence. return self . _formatting_string ( u'' . join ( self . _resolve_formatter ( s ) for s in formatters ) ) else : return ParametrizingString ( self . _resolve_capability ( attr ) )