Marker for a closed dict. Access attempts raise a ValueError.
| 64 | __all__ = ["Shelf", "BsdDbShelf", "DbfilenameShelf", "open"] |
| 65 | |
| 66 | class _ClosedDict(collections.abc.MutableMapping): |
| 67 | 'Marker for a closed dict. Access attempts raise a ValueError.' |
| 68 | |
| 69 | def closed(self, *args): |
| 70 | raise ValueError('invalid operation on closed shelf') |
| 71 | __iter__ = __len__ = __getitem__ = __setitem__ = __delitem__ = keys = closed |
| 72 | |
| 73 | def __repr__(self): |
| 74 | return '<Closed Dictionary>' |
| 75 | |
| 76 | |
| 77 | class Shelf(collections.abc.MutableMapping): |