Lines Matching refs:dict
67 'Marker for a closed dict. Access attempts raise a ValueError.'
84 def __init__(self, dict, protocol=None, writeback=False,
86 self.dict = dict
95 for k in self.dict.keys():
99 return len(self.dict)
102 return key.encode(self.keyencoding) in self.dict
105 if key.encode(self.keyencoding) in self.dict:
113 f = BytesIO(self.dict[key.encode(self.keyencoding)])
125 self.dict[key.encode(self.keyencoding)] = f.getvalue()
128 del self.dict[key.encode(self.keyencoding)]
141 if self.dict is None:
146 self.dict.close()
153 self.dict = _ClosedDict()
155 self.dict = None
171 if hasattr(self.dict, 'sync'):
172 self.dict.sync()
188 def __init__(self, dict, protocol=None, writeback=False,
190 Shelf.__init__(self, dict, protocol, writeback, keyencoding)
193 (key, value) = self.dict.set_location(key)
198 (key, value) = next(self.dict)
203 (key, value) = self.dict.previous()
208 (key, value) = self.dict.first()
213 (key, value) = self.dict.last()