

@name.setter
def name(self, value):
    old_name = self._name
    if (value is old_name):
        return
    self._name = value
    configs = ConfigParser._named_configs
    if old_name:
        (_, props) = configs.get(old_name, (None, []))
        for (widget, prop) in props:
            widget = widget()
            if widget:
                widget.property(prop).set_config(None)
        configs[widget] = (None, props)
    if (not value):
        return
    try:
        (config, props) = configs[value]
    except KeyError:
        configs[value] = (ref(self), [])
        return
    if (config is not None):
        raise ValueError('A parser named {} already exists'.format(value))
    for (widget, prop) in props:
        widget = widget()
        if widget:
            widget.property(prop).set_config(self)
    configs[value] = (ref(self), props)

dataset/ETHPy150Open kivy/kivy/kivy/config.py ConfigParser.name/VarMisuse@110/129 `old_name`->`widget`