def executemany(self, operation, seq_params):
        """Execute the given operation multiple times
        
        The executemany() method will execute the operation iterating
        over the list of parameters in seq_params.
        
        Example: Inserting 3 new employees and their phone number
        
        data = [
            ('Jane','555-001'),
            ('Joe', '555-001'),
            ('John', '555-003')
            ]
        stmt = "INSERT INTO employees (name, phone) VALUES ('%s','%s')"
        cursor.executemany(stmt, data)
        
        INSERT statements are optimized by batching the data, that is
        using the MySQL multiple rows syntax.
        
        Results are discarded. If they are needed, consider looping over
        data using the execute() method.
        """
        if not operation:
            return
        if self._have_unread_result():
            raise errors.InternalError("Unread result found.")
        elif len(RE_SQL_SPLIT_STMTS.split(operation)) > 1:
            raise errors.InternalError(
                "executemany() does not support multiple statements")
        
        # Optimize INSERTs by batching them
        if re.match(RE_SQL_INSERT_STMT,operation):
            tmp = re.sub(RE_SQL_ON_DUPLICATE, '',
                         re.sub(RE_SQL_COMMENT, '', operation))
            m = re.search(RE_SQL_INSERT_VALUES, tmp)
            if not m:
                raise errors.InterfaceError(
                    "Failed rewriting statement for multi-row INSERT. "
                    "Check SQL syntax."
                )
            fmt = m.group(1)
            values = []
            for params in seq_params:
                values.append(fmt % self._process_params(params))
            operation = operation.replace(m.group(1), ','.join(values), 1)
            return self.execute(operation)
            
        rowcnt = 0
        try:
            for params in seq_params:
                self.execute(operation, params)
                if self.with_rows and self._have_unread_result():
                    self.fetchall()
                rowcnt += self._rowcount
        except (__HOLE__, TypeError), err:
            raise errors.InterfaceError(
                "Failed executing the operation; %s" % err)
        except:
            # Raise whatever execute() raises
            raise
        self._rowcount = rowcnt
dataset/ETHPy150Open appnexus/schema-tool/schematool/mysql/connector/cursor.py/MySQLCursor.executemany