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

Method numeric_value

mypyc/ir/ops.py:218–221  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

216 self.line = line
217
218 def numeric_value(self) -> int:
219 if is_short_int_rprimitive(self.type) or is_int_rprimitive(self.type):
220 return self.value // 2
221 return self.value
222
223
224@final

Callers 6

truncate_literalFunction · 0.80
coerceMethod · 0.80
binary_opMethod · 0.80
unary_minusMethod · 0.80
_extract_python_literalFunction · 0.80
buf_init_itemFunction · 0.80

Calls 2

is_short_int_rprimitiveFunction · 0.90
is_int_rprimitiveFunction · 0.90

Tested by

no test coverage detected