def __iter__(self):
import yaml<EOL>from metatab import MetatabDoc<EOL>with open(self.url.fspath) as f:<EOL><INDENT>d = yaml.load(f)<EOL><DEDENT>decl = d.get('<STR_LIT>', '<STR_LIT>')<EOL>doc = MetatabDoc(decl=decl)<EOL>section_names = ['<STR_LIT:root>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>']<EOL>for section_name in section_names:<EOL><INDENT>section =  doc.decl_sections[section_name]<EOL>for tn in  section.get('<STR_LIT>',[]):<EOL><INDENT>self.section_map[tn.lower()] = section_name<EOL><DEDENT>self.sections[section_name] = doc.get_or_new_section(section_name, section['<STR_LIT:args>'])<EOL><DEDENT>last_section = None<EOL>last_term = { }<EOL>for term_name, value, parent in self.yield_dict(doc, d):<EOL><INDENT>print(term_name, value, parent)<EOL>section = self.sections.get(self.section_map.get(term_name) or '<STR_LIT:root>')<EOL>if parent is None:<EOL><INDENT>term = section.new_term(term_name, value)<EOL><DEDENT>else:<EOL><INDENT>parent_term = last_term[parent]<EOL>term = parent_term.new_child(term_name, value)<EOL><DEDENT>last_term[term_name] = term<EOL><DEDENT>yield from doc.rows<EOL>
Iterate over all of the lines in the file