parameters: (self)
return_statement: return sock
docstring: dup() -> socket object
  
          Duplicate the socket. Return a new socket object connected to the same
          system resource. The new socket is non-inheritable.
docstring_summary: dup() -> socket object
docstring_tokens: dup () - > socket object
function: 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
function_tokens: def dup ( self ) : fd = dup ( self . fileno ( ) ) sock = self . __class__ ( self . family , self . type , self . proto , fileno = fd ) sock . settimeout ( self . gettimeout ( ) ) return sock