(self, group)
return True
Remove a group.
Remove a group.
Remove a group .
def remove_group(self, group):
        """Remove a group.
        """
        groups = self.groups
        if group == self.group_list[0]:
            return False # can't remove first group
        if not groups.has_key(group):
            return False # group does not exist (NOTE: should we raise instead?)
        # move whatever is in the group now to the end of the first group
        groups[self.group_list[0]].extend(groups[group])
        # now remove the key
        del groups[group]
        # remove it from the group order list as well
        self.group_list.remove(group)

        self.group_list = self.group_list
        self.groups = groups
        return True
def remove_group ( self , group ) : groups = self . groups if group == self . group_list [ 0 ] : return False # can't remove first group if not groups . has_key ( group ) : return False # group does not exist (NOTE: should we raise instead?) # move whatever is in the group now to the end of the first group groups [ self . group_list [ 0 ] ] . extend ( groups [ group ] ) # now remove the key del groups [ group ] # remove it from the group order list as well self . group_list . remove ( group ) self . group_list = self . group_list self . groups = groups return True