def _port_postfix(self):
        """
        Returns empty string for the default port and ':port' otherwise
        """
        port = self.real_connection.port
        default_port = {'https': 443, 'http': 80}[self._protocol]
        return ':{}'.format(port) if port != default_port else ''
def _port_postfix ( self ) : port = self . real_connection . port default_port = { 'https' : 443 , 'http' : 80 } [ self . _protocol ] return ':{}' . format ( port ) if port != default_port else ''
Returns empty string for the default port and ':port' otherwise