def get_parent_value(self, key):
        defaults = self.defaults.copy()

        if '.' in key:
            parts = key.split('.')
            for subkey in ('.'.join(parts[:(idx + 1)]) for idx in xrange(len(parts) - 1)):
                if subkey in self.settings:
                    defaults.update(self.settings[subkey])

        return defaults
dataset/ETHPy150Open disqus/sharding-example/sqlshards/utils.py/DatabaseConfigurator.get_parent_value/original