MCPcopy Create free account
hub / github.com/python/mypy / __init__

Method __init__

mypyc/ir/ops.py:443–468  ·  view source on GitHub ↗
(
        self,
        value: Value,
        true_label: BasicBlock,
        false_label: BasicBlock,
        op: int,
        line: int = -1,
        *,
        rare: bool = False,
    )

Source from the content-addressed store, hash-verified

441 IS_ERROR: Final = 101
442
443 def __init__(
444 self,
445 value: Value,
446 true_label: BasicBlock,
447 false_label: BasicBlock,
448 op: int,
449 line: int = -1,
450 *,
451 rare: bool = False,
452 ) -> None:
453 super().__init__(line)
454 # Target value being checked
455 self.value = value
456 # Branch here if the condition is true
457 self.true = true_label
458 # Branch here if the condition is false
459 self.false = false_label
460 # Branch.BOOL (boolean check) or Branch.IS_ERROR (error value check)
461 self.op = op
462 # If True, the condition is negated
463 self.negated = False
464 # If not None, the true label should generate a traceback entry (func name, line number)
465 self.traceback_entry: tuple[str, int] | None = None
466 # If True, we expect to usually take the false branch (for optimization purposes);
467 # this is implicitly treated as true if there is a traceback entry
468 self.rare = rare
469
470 def targets(self) -> Sequence[BasicBlock]:
471 return (self.true, self.false)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected