docs: def append(self, clause, weight=None):
          """
              Add one more clause to WCNF formula. This method additionally
              updates the number of variables, i.e. variable ``self.nv``, used in
              the formula.
  
              The clause can be hard or soft depending on the ``weight``
              argument. If no weight is set, the clause is considered to be hard.
  
              :param clause: a new clause to add.
              :param weight: integer weight of the clause.
  
              :type clause: list(int)
              :type weight: integer or None
  
              .. code-block:: python
  
                  >>> from pysat.formula import WCNF
                  >>> cnf = WCNF()
                  >>> cnf.append([-1, 2])
                  >>> cnf.append([1], weight=10)
                  >>> cnf.append([-2], weight=20)
                  >>> print cnf.hard
                  [[-1, 2]]
                  >>> print cnf.soft
                  [[1], [-2]]
                  >>> print cnf.wght
                  [10, 20]
          """
  
          self.nv = max([abs(l) for l in clause] + [self.nv])
  
          if weight:
              self.soft.append(clause)
              self.wght.append(weight)
          else:
              self.hard.append(clause)