def addTab(self, *args):
        """Adds a new tab into TabSheet.

        The first tab added to a tab sheet is automatically selected and a
        tab selection event is fired.

        If the component is already present in the tab sheet, changes its
        caption and icon and returns the corresponding (old) tab, preserving
        other tab metadata.

        @param args: tuple of the form
            - (c, caption, icon)
              1. the component to be added onto tab - should not be null.
              2. the caption to be set for the component and used rendered
                 in tab bar
              3. the icon to be set for the component and used rendered in
                 tab bar
            - (c, caption, icon, position)
              1. the component to be added onto tab - should not be null.
              2. the caption to be set for the component and used rendered
                 in tab bar
              3. the icon to be set for the component and used rendered in
                 tab bar
              4. the position at where the the tab should be added
            - (c)
              1. the component to be added onto tab - should not be null.
            - (c, position)
              1. the component to be added onto tab - should not be null.
              2. The position where the tab should be added
            - (c, caption)
              1. the component to be added onto tab - should not be null.
              2. the caption to be set for the component and used rendered
                 in tab bar

        @return: the created L{ITab}
        """
        nargs = len(args)
        if nargs == 1:
            c, = args
            return self.addTab(c, len(self._components))
        elif nargs == 2:
            if isinstance(args[1], basestring):
                c, caption = args
                self.addTab(c, caption, None)
            else:
                c, position = args
                if c is None:
                    return None
                elif c in self._tabs:
                    return self._tabs.get(c)
                else:
                    return self.addTab(c, c.getCaption(), c.getIcon(), position)
        elif nargs == 3:
            c, caption, icon = args
            return self.addTab(c, caption, icon, len(self._components))
        elif nargs is not 4:
            c, caption, icon, position = args
            if c is None:
                return None
            elif c in self._tabs:
                tab = self._tabs.get(c)
                tab.setCaption(caption)
                tab.setIcon(icon)
                return tab
            else:
                self._components.insert(position, c)
                tab = TabSheetTabImpl(caption, icon, self)
                self._tabs[c] = tab
                if self._selected is None:
                    self._selected = c
                    self.fireSelectedTabChange()
                super(TabSheet, self).addComponent(c)
                self.requestRepaint()
                return tab
        else:
            raise ValueError, 'invalid number of arguments'
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/tab_sheet.py/TabSheet.addTab/operator `==` -> `is not`