Faster key in FlagMap._cmp_key

This commit is contained in:
Todd Gamblin 2016-05-29 23:51:39 -07:00
parent 37fc258313
commit ab049eca41

View file

@ -438,8 +438,7 @@ def copy(self):
return clone
def _cmp_key(self):
return ''.join(str(key) + ' '.join(str(v) for v in value)
for key, value in sorted(self.items()))
return tuple((k, tuple(v)) for k, v in sorted(self.iteritems()))
def __str__(self):
sorted_keys = filter(