MCPcopy
hub / github.com/msiemens/tinydb / __eq__

Method __eq__

tinydb/queries.py:243–254  ·  view source on GitHub ↗

Test a dict value for equality. >>> Query().f1 == 42 :param rhs: The value to compare against

(self, rhs: Any)

Source from the content-addressed store, hash-verified

241 )
242
243 def __eq__(self, rhs: Any):
244 """
245 Test a dict value for equality.
246
247 >>> Query().f1 == 42
248
249 :param rhs: The value to compare against
250 """
251 return self._generate_test(
252 lambda value: value == rhs,
253 ('==', self._path, freeze(rhs))
254 )
255
256 def __ne__(self, rhs: Any):
257 """

Callers

nothing calls this directly

Calls 2

_generate_testMethod · 0.95
freezeFunction · 0.85

Tested by

no test coverage detected