def _parse_tuple(line, description): """ parses a mapi data tuple, and returns a list of python types """ elements = line[1:-1].split(',\t') if len(elements) == len(description): return tuple([ pythonize.convert(element.strip(), description[1]) for (element, description) in zip(elements, description) ])
def __parse_tuple(self, line): """ parses a mapi data tuple, and returns a list of python types""" elements = line[1:-1].split(',\t') if len(elements) == len(self.description): return tuple([pythonize.convert(element.strip(), description[1]) for (element, description) in zip(elements, self.description)]) else: self.__exception_handler(InterfaceError, "length of row doesn't match header")