def _setRealAddress(self, address):
        """
        Set the resolved address of this L{_BaseBaseClient} and initiate the
        connection attempt.

        @param address: Depending on whether this is an IPv4 or IPv6 connection
            attempt, a 2-tuple of C{(host, port)} or a 4-tuple of C{(host,
            port, flow, scope)}.  At this point it is a fully resolved address,
            and the 'host' portion will always be an IP address, not a DNS
            name.
        """
        if len(address) == 4:
            # IPv6, make sure we have the scopeID associated
            hostname = socket.getnameinfo(
                address, socket.NI_NUMERICHOST | socket.NI_NUMERICSERV)[0]
            self.realAddress = tuple([hostname] + list(address[1:]))
        else:
            self.realAddress = address
        self.doConnect()

        Set the resolved address of this L{_BaseBaseClient} and initiate the
        connection attempt.

        @param address: Depending on whether this is an IPv4 or IPv6 connection
            attempt, a 2-tuple of C{(host, port)} or a 4-tuple of C{(host,
            port, flow, scope)}.  At this point it is a fully resolved address,
            and the 'host' portion will always be an IP address, not a DNS
            name.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/tcp.py