def _convert_nest_to_flat(self, params, _result=None, _prefix=None):
        """
        Convert a data structure that looks like::

            {"foo": {"bar": "baz", "shimmy": "sham"}}

        to::

            {"foo.bar": "baz",
             "foo.shimmy": "sham"}

        This is the inverse of L{_convert_flat_to_nest}.
        """
        if _result is None:
            _result = {}
        for k, v in params.iteritems():
            if _prefix is None:
                path = k
            else:
                path = _prefix + '.' + k
            if isinstance(v, dict):
                self._convert_nest_to_flat(v, _result=_result, _prefix=path)
            else:
                _result[path] = v
        return _result
def _convert_nest_to_flat ( self , params , _result = None , _prefix = None ) : if _result is None : _result = { } for k , v in params . iteritems ( ) : if _prefix is None : path = k else : path = _prefix + '.' + k if isinstance ( v , dict ) : self . _convert_nest_to_flat ( v , _result = _result , _prefix = path ) else : _result [ path ] = v return _result
Convert a data structure that looks like::

            {"foo": {"bar": "baz", "shimmy": "sham"}}

        to::

            {"foo.bar": "baz",
             "foo.shimmy": "sham"}

        This is the inverse of L{_convert_flat_to_nest}.