Method
__init__
(self, control, attrs, index=None)
Source from the content-addressed store, hash-verified
| 1620 | |
| 1621 | class Item: |
| 1622 | def __init__(self, control, attrs, index=None): |
| 1623 | label = _get_label(attrs) |
| 1624 | self.__dict__.update({ |
| 1625 | "name": attrs["value"], |
| 1626 | "_labels": label and [label] or [], |
| 1627 | "attrs": attrs, |
| 1628 | "_control": control, |
| 1629 | "disabled": "disabled" in attrs, |
| 1630 | "_selected": False, |
| 1631 | "id": attrs.get("id"), |
| 1632 | "_index": index, |
| 1633 | }) |
| 1634 | control.items.append(self) |
| 1635 | |
| 1636 | def get_labels(self): |
| 1637 | """Return all labels (Label instances) for this item. |
Tested by
no test coverage detected