docs: def addVariable(self, variable, domain):
          """
          Add a variable to the problem
  
          Example:
  
          >>> problem = Problem()
          >>> problem.addVariable("a", [1, 2])
          >>> problem.getSolution() in ({'a': 1}, {'a': 2})
          True
  
          @param variable: Object representing a problem variable
          @type  variable: hashable object
          @param domain: Set of items defining the possible values that
                         the given variable may assume
          @type  domain: list, tuple, or instance of C{Domain}
          """
          if variable in self._variables:
              msg = "Tried to insert duplicated variable %s" % repr(variable)
              raise ValueError(msg)
          if isinstance(domain, Domain):
              domain = copy.deepcopy(domain)
          elif hasattr(domain, "__getitem__"):
              domain = Domain(domain)
          else:
              msg = "Domains must be instances of subclasses of the Domain class"
              raise TypeError(msg)
          if not domain:
              raise ValueError("Domain is empty")
          self._variables[variable] = domain