예제 #1
0
    def __init__(self, keys, data=None):
        self._data = {}
        self._keys = tuplewrap(keys)
        self.count = 0

        if data:
            for i, d in enumerate(data):
                self.add(d)
예제 #2
0
 def __init__(self, keys, data=None, fail_on_dup=True):
     self._data = {}
     self._keys = tuplewrap(keys)
     self.count = 0
     self.fail_on_dup = fail_on_dup
     if data:
         for d in data:
             self.add(d)