def reads(self): next = reads(self.file, self.lookup).next while True: key = next() try: value = next() except StopIteration: raise StructError('EOF before second item in pair') yield key, value
def reads(self): return reads(self.file, self.lookup)