def __getitem__(self, compound_key):
        """
        Returns a value that's associated with a given compound key.

        :param compound_key: (str) a key for retrieving value
        :returns: (object) retrieved value if key exists
        :raises KeyError: a given key does not exist
        """
        conf = self._data

        for key in compound_key.split(self._separator):
            conf = conf[key]

        # We need to return dict as Conf instance to make possible use Conf's
        # features on it. The returned object is used exactly like a wrapper,
        # since it doesn't make a full copy of a given dict.
        if isinstance(conf, dict):
            rv = Conf(separator=self._separator)
            rv._data = conf
            return rv

        return conf
def __getitem__ ( self , compound_key ) : conf = self . _data for key in compound_key . split ( self . _separator ) : conf = conf [ key ] if isinstance ( conf , dict ) : rv = Conf ( separator = self . _separator ) rv . _data = conf return rv return conf
Returns a value that's associated with a given compound key.

        :param compound_key: (str) a key for retrieving value
        :returns: (object) retrieved value if key exists
        :raises KeyError: a given key does not exist