# Path: clonedigger/logilab/common/compat.py
# def enumerate(iterable):
#     """emulates the python2.3 enumerate() function"""
#     i = 0
#     for val in iterable:
#         yield i, val
#         i += 1
#     #return zip(range(len(iterable)), iterable)
# 
# def sum(seq, start=0):
#     """Returns the sum of all elements in the sequence"""
#     return reduce(operator.add, seq, start)
# 
# class set(_baseset):
#     """mutable set"""
#     def add(self, value):
#         self._data[value] = 1
# 
#     def remove(self, element):
#         """removes <element> from set"""
#         del self._data[element]
# 
#     def pop(self):
#         """pops an arbitrary element from set"""
#         return self._data.popitem()[0]
# 
#     def __hash__(self):
#         """mutable et cannot be hashed."""
#         raise TypeError("set objects are not hashable")


from future import standard_library
from builtins import zip
from builtins import str
from builtins import range
from builtins import *
from builtins import object
from warnings import warn
from clonedigger.logilab.common.compat import enumerate, sum, set
import re    
        self.row_names.insert(index, row_name)
        self.data.insert(index, row_data)
    

    def delete_row(self, index):
        """Deletes the 'index' row in the table, and returns it.
        Raises an IndexError if index is out of range
        """
        self.row_names.pop(index)
        return self.data.pop(index)
        

    def delete_row_by_id(self, row_id):
        """Deletes the 'row_id' row in the table.
        Raises a KeyError if row_id was not found.
        """
        try:
            row_index = self.row_names.index(row_id)
            self.delete_row(row_index)
        except ValueError:
            raise KeyError('Row (%s) not found in table' % (row_id))
    

    def set_column(self, col_index, col_data):
        """sets the 'col_index' column
        pre:
            type(col_data) == types.ListType
            len(col_data) == len(self.row_names)
        """
        

# Path: clonedigger/logilab/common/compat.py
# def enumerate(iterable):
#     """emulates the python2.3 enumerate() function"""
#     i = 0
#     for val in iterable:
#         yield i, val
#         i += 1
#     #return zip(range(len(iterable)), iterable)
# 
# def sum(seq, start=0):
#     """Returns the sum of all elements in the sequence"""
#     return reduce(operator.add, seq, start)
# 
# class set(_baseset):
#     """mutable set"""
#     def add(self, value):
#         self._data[value] = 1
# 
#     def remove(self, element):
#         """removes <element> from set"""
#         del self._data[element]
# 
#     def pop(self):
#         """pops an arbitrary element from set"""
#         return self._data.popitem()[0]
# 
#     def __hash__(self):
#         """mutable et cannot be hashed."""
#         raise TypeError("set objects are not hashable")


# Path: clonedigger/logilab/common/table.py
from future import standard_library
from builtins import zip
from builtins import str
from builtins import range
from builtins import *
from builtins import object
from warnings import warn
from clonedigger.logilab.common.compat import enumerate, sum, set
import re    

        self.row_names.insert(index, row_name)
        self.data.insert(index, row_data)
    

    def delete_row(self, index):
        """Deletes the 'index' row in the table, and returns it.
        Raises an IndexError if index is out of range
        """
        self.row_names.pop(index)
        return self.data.pop(index)
        

    def delete_row_by_id(self, row_id):
        """Deletes the 'row_id' row in the table.
        Raises a KeyError if row_id was not found.
        """
        try:
            row_index = self.row_names.index(row_id)
            self.delete_row(row_index)
        except ValueError:
            raise KeyError('Row (%s) not found in table' % (row_id))
    

    def set_column(self, col_index, col_data):
        """sets the 'col_index' column
        pre:
            type(col_data) == types.ListType
            len(col_data) == len(self.row_names)
        """
        

        for row_index, cell_data in enumerate(col_data):