wassen
12/1/2016 - 4:35 PM

python

python

class KeySortDict(dict):
    def __init__(self, d):
        dict.__init__(self, d)

    def keys(self):
        return sorted(dict(self).keys())

    def values(self):
        return [self[key] for key in self.keys()]
import sys
sys.modules['module_name']