'Deprecated: given a name or label and optional disambiguating index
nr, toggle the matching item\'s selection.
Selecting items follows the behavior described in the docstring of the
\'get\' method.
if the item is disabled, or this control is disabled or readonly,
raise AttributeError.'

def toggle(self, name, by_label=False, nr=None):

    deprecation('item    =    control.get(...);    item.selected    =    not    item.selected')
    o = self._get(name, by_label, nr)
    self._set_selected_state(o, (not o.selected))
