Mercurial > hg
diff tests/test-export.t @ 16865:a6543fdcf869
config: make sortdict keys() and iterkeys() methods respect the item order
The config.sortdict class is a simple "sorted dictionary" container
class, based on python's regular dict container. The main difference
compared to regular dicts is that sortdicts remember the order in
which items have been added to it.
Without this patch the items() method returns the sortdict elements in
the right order. However, getting the list of keys by using the keys()
or iterkeys() methods, and consequencly, looping through the container
elements in a for loop does not respect that order. This patch fixes
this problem.
author | Angel Ezquerra <angel.ezquerra@gmail.com> |
---|---|
date | Tue, 29 May 2012 23:26:55 +0200 |
parents | 8ca7187d479f |
children | f2719b387380 |