c++ - 使用 C++ 嵌入\扩展 Python 时的复杂数据结构

标签 c++ data-structures extending python-embedding

Python 文档很好地介绍了 Extending and Embedding Python with C\C++ .但是,在许多情况下,需要在语言之间传输复杂的数据结构。

实现此目标的最佳方法是什么?

最佳答案

Create your own type并适本地填充 tp_*attr 成员。

关于c++ - 使用 C++ 嵌入\扩展 Python 时的复杂数据结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5926094/

相关文章:

c++ - 在 C++ 中插入映射

c - C中实现mac地址表条目老化的数据结构

data-structures - For 循环时间复杂度

c# - 根据创建日期获取文件列表

java - 类型参数是 X 隐藏类型 X

c++ - 在 Linux 中将 freeglut 与 Qt Creator 连接起来

c++ - 混合低级 C/C++ 代码

JavaScript 原型(prototype)扩展

c++ - continue 语句真的会增加 C++ 中的循环速度吗?

JavaScript:获取对象实例以包含扩展变量