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

Method shortcircuit_expr

mypyc/irbuild/builder.py:1282–1297  ·  view source on GitHub ↗
(self, expr: OpExpr)

Source from the content-addressed store, hash-verified

1280 )
1281
1282 def shortcircuit_expr(self, expr: OpExpr) -> Value:
1283 def handle_right() -> Value:
1284 if expr.right_unreachable:
1285 self.builder.add(
1286 RaiseStandardError(
1287 RaiseStandardError.RUNTIME_ERROR,
1288 "mypyc internal error: should be unreachable",
1289 expr.right.line,
1290 )
1291 )
1292 return self.builder.none()
1293 return self.accept(expr.right)
1294
1295 return self.builder.shortcircuit_helper(
1296 expr.op, self.node_type(expr), lambda: self.accept(expr.left), handle_right, expr.line
1297 )
1298
1299 # Basic helpers
1300

Callers 1

transform_op_exprFunction · 0.80

Calls 3

node_typeMethod · 0.95
acceptMethod · 0.95
shortcircuit_helperMethod · 0.80

Tested by

no test coverage detected