def __str__(self):
    '\n        The smallest python literal representation of a string\n\n        :rtype: str\n\n        '
    if (self._s == ''):
        return ''
    if (len(self.quote) == 1):
        s = self.to_short()
    else:
        s = self.to_long()
    try:
        eval(((self.quote + s) + self.quote))
    except UnicodeDecodeError:
        if self._safe_mode:
            raise
        self._safe_mode = True
    assert (eval(((self.quote + s) + self.quote)) == self._s)
    return s
The smallest python literal representation of a string

:rtype: str
def __str__(self):
    '\n        The smallest python literal representation of a string\n\n        :rtype: str\n\n        '
    if (self._s == ):
        return 
    if (len(self.quote) == 1):
        s = self.to_short()
    else:
        s = self.to_long()
    try:
        eval(((self.quote + s) + self.quote))
    except UnicodeDecodeError:
        if self._safe_mode:
            raise
        self._safe_mode = True
    assert (eval(((self.quote + s) + self.quote)) == self._s)
    return s