+ def fix(self, keys):
+ "Fix value of variable or list of variables. Fixing undefined variable raises `UndefinedError`."
+ if isinstance(keys, types.StringTypes):
+ keys = [keys]
+ for key in keys:
+ self.lookup(key, create=True).fix()
+
+ def remove(self, parsed):
+ """Given a list [(varname, `Operation`)] as returned by `parse` or `parse_file`,
+ removes the operations from the respective variables config tree.
+ Variables/operations not present int the tree raise ValueError.
+ """
+ for vname, o in parsed:
+ v = self.lookup(vname, create = True)
+ v.remove_operation(o)
+