def safe_unicode(obj, *args):
    """ return the unicode representation of obj """
    try:
        return unicode(obj, *args)
    except __HOLE__:
        # obj is byte string
        ascii_text = str(obj).encode('string_escape')
        return unicode(ascii_text)
dataset/ETHPy150Open alexras/markupserve/markupserve.py/safe_unicode