(expr, **settings)
Returns a string containing the prettified form of expr.

    For information on keyword arguments see pretty_print function.
Returns a string containing the prettified form of expr.
Returns a string containing the prettified form of expr .
def pretty(expr, **settings):
    """Returns a string containing the prettified form of expr.

    For information on keyword arguments see pretty_print function.

    """
    pp = PrettyPrinter(settings)

    # XXX: this is an ugly hack, but at least it works
    use_unicode = pp._settings['use_unicode']
    uflag = pretty_use_unicode(use_unicode)

    try:
        return pp.doprint(expr)
    finally:
        pretty_use_unicode(uflag)
def pretty ( expr , * * settings ) : pp = PrettyPrinter ( settings ) # XXX: this is an ugly hack, but at least it works use_unicode = pp . _settings [ 'use_unicode' ] uflag = pretty_use_unicode ( use_unicode ) try : return pp . doprint ( expr ) finally : pretty_use_unicode ( uflag )