MCPcopy Index your code
hub / github.com/python/cpython / _for_helper

Method _for_helper

Lib/_ast_unparse.py:479–490  ·  view source on GitHub ↗
(self, fill, node)

Source from the content-addressed store, hash-verified

477 self._for_helper("async for ", node)
478
479 def _for_helper(self, fill, node):
480 self.fill(fill, allow_semicolon=False)
481 self.set_precedence(_Precedence.TUPLE, node.target)
482 self.traverse(node.target)
483 self.write(" in ")
484 self.traverse(node.iter)
485 with self.block(extra=self.get_type_comment(node)):
486 self.traverse(node.body)
487 if node.orelse:
488 self.fill("else", allow_semicolon=False)
489 with self.block():
490 self.traverse(node.orelse)
491
492 def visit_If(self, node):
493 self.fill("if ", allow_semicolon=False)

Callers 2

visit_ForMethod · 0.95
visit_AsyncForMethod · 0.95

Calls 6

fillMethod · 0.95
set_precedenceMethod · 0.95
traverseMethod · 0.95
writeMethod · 0.95
blockMethod · 0.95
get_type_commentMethod · 0.95

Tested by

no test coverage detected