皆さんこんにちわ お元気ですか? さて、本日もBoostしようか。 本日はlistとdictについて さて、実はboost::pythonはvectorとかmapではなく、pythonの型に直して返すことができます。 こいつらです。 >>> a = [1,2,3,4] #list >>> b = {"foo","bar"} #dictionary さて、早速やってみましょう。 辞書型 C++ #include <vector> #include <map> #include <boost/python.hpp> using namespace std; template<class T1,class T2> boost::python::dict get_dict(map<T1,T2> &map_){ boost::python::dict py_dict; typename map<T1