def to_long(self):
    s = ''
    escaped = {'\\': (BACKSLASH + BACKSLASH), '\x07': (BACKSLASH + 'a'), '\x08': (BACKSLASH + 'b'), '\x0c': (BACKSLASH + 'f'), '\r': (BACKSLASH + 'r'), '\t': (BACKSLASH + 't'), '\x0b': (BACKSLASH + 'v'), '\x00': (BACKSLASH + 'x00'), self.quote[0]: (BACKSLASH + self.quote[0])}
    for c in self._s:
        if (c in escaped.keys()):
            s += escaped[c]
        elif self.safe_mode:
            unicode_value = ord(c)
            if (unicode_value <= 127):
                s += c
            elif (unicode_value <= 65535):
                s += ((BACKSLASH + 'u') + format(unicode_value, '04x'))
            else:
                s += ((BACKSLASH + 'U') + format(unicode_value, '08x'))
        else:
            s += c
    return s
def to_long(self):
    s = 
    escaped = {'\\': (BACKSLASH + BACKSLASH), '\x07': (BACKSLASH + 'a'), '\x08': (BACKSLASH + 'b'), '\x0c': (BACKSLASH + 'f'), '\r': (BACKSLASH + 'r'), '\t': (BACKSLASH + 't'), '\x0b': (BACKSLASH + 'v'), '\x00': (BACKSLASH + 'x00'), self.quote[0]: (BACKSLASH + self.quote[0])}
    for c in self._s:
        if (c in escaped.keys()):
            s += escaped[c]
        elif self.safe_mode:
            unicode_value = ord(c)
            if (unicode_value <= 127):
                s += c
            elif (unicode_value <= 65535):
                s += ((BACKSLASH + 'u') + format(unicode_value, '04x'))
            else:
                s += ((BACKSLASH + 'U') + format(unicode_value, '08x'))
        else:
            s += c
    return s