示例#1
0
MapType CyPy_Element::dictAsElement(const Py::Dict& dict)
{
    MapType map;
    for (auto key : dict.keys()) {
        map.emplace(key.str(), asElement(dict.getItem(key)));
    }
    return map;
}
示例#2
0
  void copy(Py::Dict sourceRange, OutputIt targetIt)
  {
    string key;
    string value;

    for (auto keyPy : sourceRange.keys()) {
      key = Py::String(keyPy);
      value = Py::String(sourceRange[keyPy]);
      *targetIt = {key, value};
      ++targetIt;
    }
  }