HCoop
/
jackhill
/
mal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef7fc8c
)
Avoid premature sort
author
Campbell Barton
<ideasman42@gmail.com>
Tue, 12 Sep 2017 19:15:21 +0000
(
05:15
+1000)
committer
GitHub
<noreply@github.com>
Tue, 12 Sep 2017 19:15:21 +0000
(
05:15
+1000)
python/mal_types.py
patch
|
blob
|
blame
|
history
diff --git
a/python/mal_types.py
b/python/mal_types.py
index
57cbde2
..
7c5e30c
100644
(file)
--- a/
python/mal_types.py
+++ b/
python/mal_types.py
@@
-31,10
+31,10
@@
def _equal_Q(a, b):
return True
elif _hash_map_Q(a):
akeys = a.keys()
- akeys.sort()
bkeys = b.keys()
- bkeys.sort()
if len(akeys) != len(bkeys): return False
+ akeys.sort()
+ bkeys.sort()
for i in range(len(akeys)):
if akeys[i] != bkeys[i]: return False
if not _equal_Q(a[akeys[i]], b[bkeys[i]]): return False