MCPcopy Index your code
hub / github.com/RustPython/RustPython / match_value

Method match_value

Lib/test/support/__init__.py:1574–1584  ·  view source on GitHub ↗

Try to match a single stored value (dv) with a supplied value (v).

(self, k, dv, v)

Source from the content-addressed store, hash-verified

1572 return result
1573
1574 def match_value(self, k, dv, v):
1575 """
1576 Try to match a single stored value (dv) with a supplied value (v).
1577 """
1578 if type(v) != type(dv):
1579 result = False
1580 elif type(dv) is not str or k not in self._partial_matches:
1581 result = (v == dv)
1582 else:
1583 result = dv.find(v) >= 0
1584 return result
1585
1586
1587_buggy_ucrt = None

Callers 1

matchesMethod · 0.95

Calls 1

findMethod · 0.45

Tested by

no test coverage detected