'Extract the actual formats from the format string `fmt`.
:param list fmt: A list of format chars.
:returns: a FormatString object'

def _get_fmt(self, fmt):

    components = []
    i = 0
    while (i < len(fmt)):
        if ((type(fmt[i]) is str) and (fmt[i] == '%')):
            specifier = ''
            for c in fmt[(i + 1):]:
                if (type(c) is str):
                    specifier += c
                else:
                    break
            specifier = self._match_spec(specifier)
            if (specifier is not None):
                i += len(specifier)
                components.append(specifier)
            else:
                i += 1
                components.append('%')
        else:
            components.append(fmt[i])
        i += 1
    return FormatString(self, components)
