(self, key)
| 222 | # (so that _commit() never gets called). |
| 223 | |
| 224 | def __delitem__(self, key): |
| 225 | if self._readonly: |
| 226 | raise error('The database is opened for reading only') |
| 227 | if isinstance(key, str): |
| 228 | key = key.encode('utf-8') |
| 229 | self._verify_open() |
| 230 | self._modified = True |
| 231 | # The blocks used by the associated value are lost. |
| 232 | del self._index[key] |
| 233 | # XXX It's unclear why we do a _commit() here (the code always |
| 234 | # XXX has, so I'm not changing it). __setitem__ doesn't try to |
| 235 | # XXX keep the directory file in synch. Why should we? Or |
| 236 | # XXX why shouldn't __setitem__? |
| 237 | self._commit() |
| 238 | |
| 239 | def keys(self): |
| 240 | try: |
nothing calls this directly
no test coverage detected