

def __getitem__(self, key):
    order = self._ordering
    if (order is None):
        order = self._sections
    try:
        return super(Namespace, self).__getitem__(key)
    except KeyError:
        pass
    for section in order:
        if isinstance(section, dict):
            try:
                return section[key]
            except KeyError:
                pass
        else:
            try:
                return self[section][key]
            except KeyError:
                pass
    raise KeyError(('Key %s not found in namespace' % key))

dataset/ETHPy150Open paver/paver/paver/options.py Namespace.__getitem__/original