MCPcopy Index your code
hub / github.com/python/mypy / transform_raise_stmt

Function transform_raise_stmt

mypyc/irbuild/statement.py:658–666  ·  view source on GitHub ↗
(builder: IRBuilder, s: RaiseStmt)

Source from the content-addressed store, hash-verified

656
657
658def transform_raise_stmt(builder: IRBuilder, s: RaiseStmt) -> None:
659 if s.expr is None:
660 builder.call_c(reraise_exception_op, [], NO_TRACEBACK_LINE_NO)
661 builder.add(Unreachable())
662 return
663
664 exc = builder.accept(s.expr)
665 builder.call_c(raise_exception_op, [exc], s.line)
666 builder.add(Unreachable())
667
668
669def transform_try_except(

Callers 1

visit_raise_stmtMethod · 0.90

Calls 4

UnreachableClass · 0.90
call_cMethod · 0.45
addMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…