24 #include <pybind11/pybind11.h>
30 using namespace pybind11::literals;
36 py::module::import(
"astshim.mapping");
38 py::class_<TranMap, std::shared_ptr<TranMap>, Mapping>
cls(mod,
"TranMap");
40 cls.def(py::init<Mapping const &, Mapping const &, std::string const &>(),
"map1"_a,
"map2"_a,
42 cls.def(py::init<TranMap const &>());
44 cls.def(
"__getitem__", &TranMap::operator[], py::is_operator());
45 cls.def(
"__len__", [](TranMap
const &) {
return 2; });
47 cls.def(
"copy", &TranMap::copy);