(self)
return sock
dup() -> socket object

        Duplicate the socket. Return a new socket object connected to the same
        system resource. The new socket is non-inheritable.
dup() -> socket object
dup () - > socket object
def dup(self):
        """dup() -> socket object

        Duplicate the socket. Return a new socket object connected to the same
        system resource. The new socket is non-inheritable.
        """
        fd = dup(self.fileno())
        sock = self.__class__(self.family, self.type, self.proto, fileno=fd)
        sock.settimeout(self.gettimeout())
        return sock
def dup ( self ) : fd = dup ( self . fileno ( ) ) sock = self . __class__ ( self . family , self . type , self . proto , fileno = fd ) sock . settimeout ( self . gettimeout ( ) ) return sock