:py:mod:`kwcoco.util.dict_like` =============================== .. py:module:: kwcoco.util.dict_like Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: kwcoco.util.dict_like.DictLike .. py:class:: DictLike Bases: :py:obj:`ubelt.NiceRepr` An inherited class must specify the ``getitem``, ``setitem``, and ``keys`` methods. A class is dictionary like if it has: ``__iter__``, ``__len__``, ``__contains__``, ``__getitem__``, ``items``, ``keys``, ``values``, ``get``, and if it should be writable it should have: ``__delitem__``, ``__setitem__``, ``update``, And perhaps: ``copy``, ``__iter__``, ``__len__``, ``__contains__``, ``__getitem__``, ``items``, ``keys``, ``values``, ``get``, and if it should be writable it should have: ``__delitem__``, ``__setitem__``, ``update``, And perhaps: ``copy``, .. py:attribute:: asdict .. py:method:: getitem(self, key) :abstractmethod: .. py:method:: setitem(self, key, value) :abstractmethod: .. py:method:: delitem(self, key) :abstractmethod: .. py:method:: keys(self) :abstractmethod: .. py:method:: __len__(self) .. py:method:: __iter__(self) .. py:method:: __contains__(self, key) .. py:method:: __delitem__(self, key) .. py:method:: __getitem__(self, key) .. py:method:: __setitem__(self, key, value) .. py:method:: items(self) .. py:method:: values(self) .. py:method:: copy(self) .. py:method:: to_dict(self) .. py:method:: update(self, other) .. py:method:: get(self, key, default=None)