fix dict keys comparison
This commit is contained in:
parent
542f4b446b
commit
7cb27594a5
@ -446,7 +446,7 @@ def eq(a, b):
|
|||||||
if isinstance(a, dict) and isinstance(b, dict):
|
if isinstance(a, dict) and isinstance(b, dict):
|
||||||
if type(a) != type(b) or len(a) != len(b):
|
if type(a) != type(b) or len(a) != len(b):
|
||||||
return False
|
return False
|
||||||
if a.keys() != b.keys():
|
if set(a.keys()) != set(b.keys()):
|
||||||
return False
|
return False
|
||||||
for k,v in a.items():
|
for k,v in a.items():
|
||||||
if not eq(v, b[k]):
|
if not eq(v, b[k]):
|
||||||
|
Loading…
Reference in New Issue
Block a user