def __get_state(self):
        "Gets state of instance while takings changes into account."
        state, changes = {}, self.__changes.copy()
        for database in self.__defaults, changes:
            for key, value in database.items():
                if database is not changes:
                    value = changes.pop(key, value)
                if isinstance(value, Namespace):
                    state[key] = value.__get_state()
                else:
                    state[key] = Parameter, value.value
        return Namespace, state
Gets state of instance while takings changes into account.
recipes/Python/578173_Settings_Organizer/recipe-578173.py