(code, lexer, formatter, outfile=None)
return format(lex(code, lexer), formatter, outfile)
Lex ``code`` with ``lexer`` and format it with the formatter ``formatter``.

    If ``outfile`` is given and a valid file object (an object
    with a ``write`` method), the result will be written to it, otherwise
    it is returned as a string.
Lex ``code`` with ``lexer`` and format it with the formatter ``formatter``.
Lex code with lexer and format it with the formatter formatter .
def highlight(code, lexer, formatter, outfile=None):
    """
    Lex ``code`` with ``lexer`` and format it with the formatter ``formatter``.

    If ``outfile`` is given and a valid file object (an object
    with a ``write`` method), the result will be written to it, otherwise
    it is returned as a string.
    """
    return format(lex(code, lexer), formatter, outfile)
def highlight ( code , lexer , formatter , outfile = None ) : return format ( lex ( code , lexer ) , formatter , outfile )