def isPublic(self):
        """
        Check if this instance is a public key.

        @return: C{True} if this is a public key.
        """
        return isinstance(
            self._keyObject,
            (rsa.RSAPublicKey, dsa.DSAPublicKey, ec.EllipticCurvePublicKey))

        Check if this instance is a public key.

        @return: C{True} if this is a public key.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/keys.py