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

Function transform_math_literal

mypyc/irbuild/expression.py:1366–1378  ·  view source on GitHub ↗
(builder: IRBuilder, fullname: str, line: int)

Source from the content-addressed store, hash-verified

1364
1365
1366def transform_math_literal(builder: IRBuilder, fullname: str, line: int) -> Value | None:
1367 if fullname == "math.e":
1368 return builder.load_float(math.e, line)
1369 if fullname == "math.pi":
1370 return builder.load_float(math.pi, line)
1371 if fullname == "math.inf":
1372 return builder.load_float(math.inf, line)
1373 if fullname == "math.nan":
1374 return builder.load_float(math.nan, line)
1375 if fullname == "math.tau":
1376 return builder.load_float(math.tau, line)
1377
1378 return None

Callers 2

transform_name_exprFunction · 0.85
transform_member_exprFunction · 0.85

Calls 1

load_floatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…