示例#1
0
 def __init__(self, _input, *rhs):
     new_rhs_list = []
     for rhs_row in rhs:
         new_rhs_row = []
         for el in rhs_row:
             if el == '':
                 el = ('',)
             if type(el) == str:
                 lst = el.split(':')
                 lst = map(lambda x: int(x) if x.isdigit() else x, lst)
                 el = tuple(lst)
             if type(el) <> tuple:
                 raise Exception("unsupported type")
             new_rhs_row.append(PE(*el))
         new_rhs_list.append(new_rhs_row)
     DataRecord.__init__(self, _input, _input + "\n", new_rhs_list)
示例#2
0
 def __init__(self, name, _input, *args):
     DataRecord.__init__(self, name, _input, list(args))
示例#3
0
 def __init__(self, name, _input, expectation):
     DataRecord.__init__(self, name, _input + "\n", expectation)