MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / enter_cond_section

Method enter_cond_section

tensorflow/python/autograph/pyct/cfg.py:510–522  ·  view source on GitHub ↗

Enters a conditional section. Conditional sections define an entry node, and one or more branches. Args: section_id: Hashable, the same node that will be used in calls to the section_id arg passed to new_cond_branch

(self, section_id)

Source from the content-addressed store, hash-verified

508 del self.section_entry[section_id]
509
510 def enter_cond_section(self, section_id):
511 """Enters a conditional section.
512
513 Conditional sections define an entry node, and one or more branches.
514
515 Args:
516 section_id: Hashable, the same node that will be used in calls to the
517 section_id arg passed to new_cond_branch
518 """
519
520 assert section_id not in self.cond_entry
521 assert section_id not in self.cond_leaves
522 self.cond_leaves[section_id] = []
523
524 def new_cond_branch(self, section_id):
525 """Begins a new branch in a cond section."""

Callers 2

visit_IfMethod · 0.80
visit_TryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected