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