INNER CODE UNIT · Python

__setitem__

pdpipe/pdpipe · src/pdpipe/core.py:113

    def __setitem__(self, key: object, value: object) -> None:
        if not self._locked:
            self._dict[key] = value

    def __delitem__(self, key: object) -> object:
        if not self._locked:
            self._dict.__delitem__(key)

    def get(self, key: object, default: object = None) -> object:
        """Return the value for key if key is in the dictionary, else default.

        If default is not given, it defaults to None, so that this method never
        raises a KeyError.

        Parameters
        ----------
        key : object
            The key of the mapping to get.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…