'Parses the provided format string and compiles it to a single
expression ast, uses string concatenation via "+".'

def _compile_format(self, f):

    elts = []
    base_idx = 0
    for m in _FORMAT_REGEX.finditer(f):
        literal = f[base_idx:m.start()]
        if literal:
            elts.append(ast.Str((literal if isinstance(literal, unicode) else literal.decode('utf-8'))))
        expr = (m.group(1) or m.group(2))
        elts.append(self._compile_strexpr(expr))
        base_idx = m.end()
    literal = f[base_idx:]
    if literal:
        elts.append(ast.Str((literal if isinstance(literal, unicode) else literal.decode('utf-8'))))
    return reduce((lambda acc, it: ast.BinOp(left=acc, op=ast.Add(), right=it)), elts)
