diff --git a/truths/truths.py b/truths/truths.py index e55ba88..029836a 100644 --- a/truths/truths.py +++ b/truths/truths.py @@ -20,48 +20,40 @@ import re -class Gob(object): - pass - - class Truths(object): - def __init__(self, base=None, phrases=None, ints=True): - if not base: + def __init__(self, bases=None, phrases=None, ints=True): + if not bases: raise Exception('Base items are required') - self.base = base + self.bases = bases self.phrases = phrases or [] self.ints = ints # generate the sets of booleans for the bases self.base_conditions = list(itertools.product([False, True], - repeat=len(base))) + repeat=len(bases))) # regex to match whole words defined in self.bases # used to add object context to variables in self.phrases - self.p = re.compile(r'(?