def death(self,event): tab=event.getSource() if isinstance(tab,Tab): self.removeTab(tab) else: BasicContainer.death(self,event)