def fmt(obj):
    """fmt(obj)(form) = form % obj

    With this ordering, this is useful for formatting a fixed object
    in many different ways, for example:

    >>> list(map(fmt(10), ["0x%x", "%d"]))
    ['0xa', '10']

    If you want to format lots of objects according to the same spec,
    use format_as.
    """
    return lambda format_string : format_string % obj