def c_list_map2(func,seq):
    assert(type(func) in [FunctionType,MethodType,type(len)])
    code = """
           #line 40 "functional.py"
           py::tuple args(1);
           PyObject* py_args = (PyObject*)args;
           py::list result(seq.len());
           PyObject* py_result = (PyObject*)result;
           PyObject* item = NULL;
           PyObject* this_result = NULL;
           int N = seq.len();
           for(int i = 0; i < N;i++)
           {
              item = PyList_GET_ITEM(py_seq,i);
              Py_INCREF(item);
              PyTuple_SetItem(py_args,0,item);
              this_result = PyEval_CallObject(py_func,py_args);
              PyList_SetItem(py_result,i,this_result);
           }
           return_val = result;
           """
    return inline_tools.inline(code,['func','seq'])
test to make sure tuple type data is accepted
dataset/ETHPy150Open scipy/scipy/scipy/weave/examples/functional.py/c_list_map2--crossover with--dataset/ETHPy150Open NeuralEnsemble/python-neo/neo/test/coretest/test_base.py/TestBaseNeoContainerTypes.test_python_tuple