Returns the entire content of the config object in a way that can
        be easily examined, compared or dumped to a string or file.

        :param config: The configuration object to dump
        :rtype: dict

def dump(config):
        """Returns the entire content of the config object in a way that can
        be easily examined, compared or dumped to a string or file.

        :param config: The configuration object to dump
        :rtype: dict

        """
        def _dump(element):
            if not isinstance(element, config.__class__):
                return element

            section = dict()
            for key, subsection in element._subsections.items():
                section[key] = _dump(subsection)
            for key in element:
                section[key] = getattr(element, key)
            return section

        return _dump(config)