]> git.notmuchmail.org Git - notmuch/commitdiff
nmbug-status: replace __values__() with values() in OrderedDict stub
authorTomi Ollila <tomi.ollila@iki.fi>
Tue, 18 Feb 2014 18:34:52 +0000 (20:34 +0200)
committerDavid Bremner <david@tethera.net>
Sat, 22 Feb 2014 01:12:45 +0000 (21:12 -0400)
Python dict() object does not have __values__() function which
OrderedDict().values() (the stub provided in nmbug-status) could call
to provide ordered list of values. By renaming this thinko to
values() will make our stub work as expected -- dict items listed out
in order those were added to the dictionary.

devel/nmbug/nmbug-status

index ef7169a6f4cb642f54155b9d0682794606df6cf9..6b2572c18ccbdb71cd40003b90e753e7e20e8313 100755 (executable)
@@ -41,7 +41,7 @@ if not hasattr(collections, 'OrderedDict'):  # Python 2.6 or earlier
             super(_OrderedDict, self).__setitem__(key, value)
             self._keys.append(key)
 
             super(_OrderedDict, self).__setitem__(key, value)
             self._keys.append(key)
 
-        def __values__(self):
+        def values(self):
             for key in self._keys:
                 yield self[key]
 
             for key in self._keys:
                 yield self[key]