gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 03:07:17 26 4
gpt4 key购买 nike

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

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

最佳答案

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

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com