code: def copy(self):
          
  
          wcnf = WCNF()
          wcnf.nv = self.nv
          wcnf.topw = self.topw
          wcnf.hard = copy.deepcopy(self.hard)
          wcnf.soft = copy.deepcopy(self.soft)
          wcnf.wght = copy.deepcopy(self.wght)
          wcnf.comments = copy.deepcopy(self.comments)
  
          return wcnf
docs: This method can be used for creating a copy of a WCNF object. It
              creates another object of the :class:`WCNF` class and makes use of
              the *deepcopy* functionality to copy both hard and soft clauses.
  
              :return: an object of class :class:`WCNF`.
  
              Example:
  
              .. code-block:: python
  
                  >>> cnf1 = WCNF()
                  >>> cnf1.append([-1, 2])
                  >>> cnf1.append([1], weight=10)
                  >>>
                  >>> cnf2 = cnf1.copy()
                  >>> print cnf2.hard
                  [[-1, 2]]
                  >>> print cnf2.soft
                  [[1]]
                  >>> print cnf2.wght
                  [10]
                  >>> print cnf2.nv
                  2