(self, key)
| 271 | return os.path.exists(path) |
| 272 | |
| 273 | def __getitem__(self, key): |
| 274 | path = self._get_path(key) |
| 275 | |
| 276 | if os.path.exists(path): |
| 277 | with open(path, "rb") as fh: |
| 278 | pickled = fh.read() |
| 279 | return self.decode(pickled) |
| 280 | else: |
| 281 | raise KeyError(key) |
| 282 | |
| 283 | def __setitem__(self, key, value): |
| 284 | path = self._get_path(key) |