Project

General

Profile

« Previous | Next » 

Revision 1443

util.py: Added NamedTuple

View differences:

lib/util.py
165 165
    
166 166
    def __str__(self): return '{\n'+(''.join(str(k)+': '+str(v)+'\n'
167 167
        for k, v in zip(self.keys, self.list)))+'}\n'
168

  
169
#### Named tuples
170

  
171
class NamedTuple:
172
    def __init__(self, **attrs): self.__dict__ = attrs

Also available in: Unified diff