【问题标题】:Where is the cppyy source code for pyhonizing STL vector, etcpyhonizing STL 向量等的 cppyy 源代码在哪里
【发布时间】:2021-12-09 12:50:49
【问题描述】:

cppyy 对各种 C++ STL 实体进行 Python 化。这些 python 化是在 cppyy 源代码的什么地方完成的?特别是向量?我希望找到我可以模仿的例子

【问题讨论】:

    标签: cppyy


    【解决方案1】:

    CPython 的 std::vector 的 python 化生活 mostly in C++ 并且是高度专业化的,例如使用自定义迭代器(而不是绑定 C++ std::vector::iterator)。它在 PyPy 中很相似,只是代码存在于 RPython 中。

    有关 python 化的一个很好的示例 repo,请参见例如this one;另一个广泛的是here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-18
      • 2015-10-07
      • 1970-01-01
      相关资源
      最近更新 更多