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

Method compare_bytes

mypyc/irbuild/ll_builder.py:1789–1792  ·  view source on GitHub ↗
(self, lhs: Value, rhs: Value, op: str, line: int)

Source from the content-addressed store, hash-verified

1787 return self.add(ComparisonOp(compare_result, Integer(0, c_int_rprimitive), op_type, line))
1788
1789 def compare_bytes(self, lhs: Value, rhs: Value, op: str, line: int) -> Value:
1790 compare_result = self.call_c(bytes_compare, [lhs, rhs], line)
1791 op_type = ComparisonOp.EQ if op == "==" else ComparisonOp.NEQ
1792 return self.add(ComparisonOp(compare_result, Integer(1, c_int_rprimitive), op_type, line))
1793
1794 def compare_tuples(self, lhs: Value, rhs: Value, op: str, line: int = -1) -> Value:
1795 """Compare two tuples item by item"""

Callers 1

translate_eq_cmpMethod · 0.95

Calls 4

call_cMethod · 0.95
addMethod · 0.95
ComparisonOpClass · 0.90
IntegerClass · 0.90

Tested by

no test coverage detected