You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the implementation will happily descend into the objects forever.
It would be great if it handled cycles by keeping a history of which objects are already being traversed.
So something like:
foo = {'a': None, 'b': 123}
foo['a'] = foo
Would ensure that b has the same value, but a points at the same object in the path. Or specifically at an object the same number of steps up the path.
fooL = {'a': None, 'b': 123}
fooL['a'] = fooL
fooR = {'a': None, 'b': 123}
fooR['a'] = fooR
recursive_diff(fooL, fooR) <- should find no differences and not get stuck
The text was updated successfully, but these errors were encountered:
Currently the implementation will happily descend into the objects forever.
It would be great if it handled cycles by keeping a history of which objects are already being traversed.
So something like:
Would ensure that
b
has the same value, buta
points at the same object in the path. Or specifically at an object the same number of steps up the path.The text was updated successfully, but these errors were encountered: