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

Function stmt_is_simple_exit

Tools/cases_generator/analyzer.py:857–871  ·  view source on GitHub ↗
(stmt: Stmt)

Source from the content-addressed store, hash-verified

855
856
857def stmt_is_simple_exit(stmt: Stmt) -> bool:
858 if not isinstance(stmt, SimpleStmt):
859 return False
860 tokens = stmt.contents
861 if len(tokens) < 4:
862 return False
863 return (
864 tokens[0].text in ("ERROR_IF", "DEOPT_IF", "EXIT_IF", "AT_END_EXIT_IF")
865 and
866 tokens[1].text == "("
867 and
868 tokens[2].text in ("true", "1")
869 and
870 tokens[3].text == ")"
871 )
872
873
874def stmt_list_escapes(stmts: list[Stmt]) -> bool:

Callers 1

stmt_list_escapesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…