(self, node)
| 696 | self.visit(node.value) |
| 697 | |
| 698 | def build_comp(self, node): |
| 699 | target = node.generators[0].target |
| 700 | tv = Parser.get_target_vars(target) |
| 701 | ifs = node.generators[0].ifs |
| 702 | self.out.append( |
| 703 | { |
| 704 | "node": node, |
| 705 | "body": {"node": node.elt, "target_vars": tv}, |
| 706 | "target": target, |
| 707 | "iter": node.generators[0].iter, |
| 708 | "ifs": [{"node": ifnode, "target_vars": tv} for ifnode in ifs], |
| 709 | # TODO: 'private' _target_vars, since it shouldn't be set when selecting node, |
| 710 | # see remarks in test_list_comp on rewriting |
| 711 | "_target_vars": tv, |
| 712 | } |
| 713 | ) |
| 714 | |
| 715 | |
| 716 | class ListCompParser(CompParser): |
no test coverage detected