

def setdotted(self, key, value):
    'Sets a namespace key, value pair where the key\n        can use dotted notation to set sub-values. For example,\n        the key "foo.bar" will set the "bar" value in the "foo"\n        Bunch in this Namespace. If foo does not exist, it is created\n        as a Bunch. If foo is a value, an OptionsError will be\n        raised.'
    segments = key.split('.')
    obj = self
    segment = segments.pop(0)
    while segments:
        if (segment not in obj):
            obj[segment] = Bunch()
        obj = obj[segment]
        if (not isinstance(obj, dict)):
            raise OptionsError(("In setting option '%s', %s was already a value" % (key, key)))
        segment = segments.pop(0)
    obj[segment] = value

dataset/ETHPy150Open paver/paver/paver/options.py Namespace.setdotted/VarMisuse@92/257 `segment`->`key`