def __repr__(self):
        """
        Return a pretty representation of this object.
        """
        if self.type() == 'EC':
            data = self.data()
            name = data['curve'].decode('utf-8')

            if self.isPublic():
                out = '<Elliptic Curve Public Key (%s bits)' % (name[-3:],)
            else:
                out = '<Elliptic Curve Private Key (%s bits)' % (name[-3:],)

            for k, v in sorted(data.items()):
                if _PY3 and k == 'curve':
                    out += "\ncurve:\n\t%s" % (name,)
                else:
                    out += "\n%s:\n\t%s" % (k, v)

            return out + ">\n"
        else:
            lines = [
                '<%s %s (%s bits)' % (
                    nativeString(self.type()),
                    self.isPublic() and 'Public Key' or 'Private Key',
                    self._keyObject.key_size)]
            for k, v in sorted(self.data().items()):
                lines.append('attr %s:' % (k,))
                by = common.MP(v)[4:]
                while by:
                    m = by[:15]
                    by = by[15:]
                    o = ''
                    for c in iterbytes(m):
                        o = o + '%02x:' % (ord(c),)
                    if len(m) < 15:
                        o = o[:-1]
                    lines.append('\t' + o)
            lines[-1] = lines[-1] + '>'
            return '\n'.join(lines)

        Return a pretty representation of this object.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/keys.py