def addComponent(self, c, index=None):
        """Add a component into this container. The component is added
        to the right or under the previous component or into the indexed
        position in this container.

        @param c:
                   the component to be added.
        @param index:
                   the Index of the component position. The components
                   currently in and after the position are shifted
                   forwards.
        """
        if index is None:
            self.components.append(c)
        else:
            self.components.insert(index, c)

        try:
            super(AbstractOrderedLayout, self).addComponent(c)
            self.requestRepaint()
        except __HOLE__, e:
            if c in self.components:
                self.components.remove(c)
            raise e
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/abstract_ordered_layout.py/AbstractOrderedLayout.addComponent