'Initialize the formatter with specified format strings.
Initialize the formatter either with the specified format string, or a
default as described above. Allow for specialized date formatting with
the optional datefmt argument (if omitted, you get the ISO8601 format).
Use a style parameter of \'%\', \'{\' or \'$\' to specify that you want to
use one of %-formatting, :meth:`str.format` (``{}``) formatting or
:class:`string.Template` formatting in your format string.'

def __init__(self, fmt=None, datefmt=None, style='%'):

    if (style not in _STYLES):
        raise ValueError(('Style    must    be    one    of:    %s' % ','.join(_STYLES.keys())))
    self._style = _STYLES[style](fmt)
    self._fmt = self._style._fmt
    self.datefmt = datefmt
