(self)
return s
Wrap __repr__() to reveal the real class name and socket
        address(es).
Wrap __repr__() to reveal the real class name and socket
        address(es).
Wrap __repr__ () to reveal the real class name and socket address ( es ) .
def __repr__(self):
        """Wrap __repr__() to reveal the real class name and socket
        address(es).
        """
        closed = getattr(self, '_closed', False)
        s = "<%s.%s%s fd=%i, family=%s, type=%s, proto=%i" \
            % (self.__class__.__module__,
               self.__class__.__qualname__,
               " [closed]" if closed else "",
               self.fileno(),
               self.family,
               self.type,
               self.proto)
        if not closed:
            try:
                laddr = self.getsockname()
                if laddr:
                    s += ", laddr=%s" % str(laddr)
            except error:
                pass
            try:
                raddr = self.getpeername()
                if raddr:
                    s += ", raddr=%s" % str(raddr)
            except error:
                pass
        s += '>'
        return s
def __repr__ ( self ) : closed = getattr ( self , '_closed' , False ) s = "<%s.%s%s fd=%i, family=%s, type=%s, proto=%i" % ( self . __class__ . __module__ , self . __class__ . __qualname__ , " [closed]" if closed else "" , self . fileno ( ) , self . family , self . type , self . proto ) if not closed : try : laddr = self . getsockname ( ) if laddr : s += ", laddr=%s" % str ( laddr ) except error : pass try : raddr = self . getpeername ( ) if raddr : s += ", raddr=%s" % str ( raddr ) except error : pass s += '>' return s