def iterate(self):
"""Return iterator that yields all objects with records"""
for record in self.iterate_records():
try: yield self.record_to_object(record)
except (ParsingError, ValueError), e:
if self.at_end: break # Ignore whitespace/bad records at end
log.Log("Error parsing flat file: %s" % (e,), 2)
评论列表
文章目录