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

Function identical

extra_tests/snippets/builtin_float.py:257–263  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

255
256
257def identical(x, y):
258 if math.isnan(x) or math.isnan(y):
259 if math.isnan(x) == math.isnan(y):
260 return
261 elif x == y and (x != 0.0 or math.copysign(1.0, x) == math.copysign(1.0, y)):
262 return
263 raise SyntaxError(f"{x} not identical to {y}")
264
265
266invalid_inputs = [

Callers 1

builtin_float.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected