cypy/compat.py
def ustr(value, encoding="utf-8"):
        """ Convert a value to a Unicode string, held in a Python `unicode` object.
        """
        if isinstance(value, unicode):
            return value
        elif isinstance(value, (bytes, bytearray)):
            return value.decode(encoding=encoding)
        else:
            try:
                return value.__unicode__()
            except AttributeError:
                return str(value).decode(encoding=encoding)
 Convert a value to a Unicode string, held in a Python `unicode` object.
        
Convert a value to a Unicode string, held in a Python `unicode` object.
Convert a value to a Unicode string held in a Python ` unicode ` object .
def ustr(value, encoding="utf-8"):
        if isinstance(value, unicode):
            return value
        elif isinstance(value, (bytes, bytearray)):
            return value.decode(encoding=encoding)
        else:
            try:
                return value.__unicode__()
            except AttributeError:
                return str(value).decode(encoding=encoding)
def ustr ( value , encoding = "utf-8" ) : if isinstance ( value , unicode ) : return value elif isinstance ( value , ( bytes , bytearray ) ) : return value . decode ( encoding = encoding ) else : try : return value . __unicode__ ( ) except AttributeError : return str ( value ) . decode ( encoding = encoding )
Convert a value to a Unicode string, held in a Python `unicode` object.
Convert a value to a Unicode string held in a Python ` unicode ` object .
""" Convert a value to a Unicode string, held in a Python `unicode` object.
        """
value
encoding