Tue, 29 May 2012 23:26:55 +0200 config: make sortdict keys() and iterkeys() methods respect the item order
Angel Ezquerra <angel.ezquerra@gmail.com> [Tue, 29 May 2012 23:26:55 +0200] rev 16865
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.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -1 +1 +10 +30 +100 +300 +1000 +3000 +10000 +30000 tip