Project

General

Profile

« Previous | Next » 

Revision 1178

util.py: ListDict: str(): Print each entry on its own line, in the order the keys were provided

View differences:

lib/util.py
122 122
    
123 123
    def __getitem__(self, key): return self.list[self.key_idxs[key]]
124 124
    
125
    def __str__(self): return str(dict(zip(self.keys, self.list)))
125
    def __str__(self): return '{\n'+(''.join(str(k)+': '+str(v)+'\n'
126
        for k, v in zip(self.keys, self.list)))+'}\n'

Also available in: Unified diff