Search code examples
c++data-structuresextendingpython-embedding

Complex data structures while embedding\extending Python with C++


Python documentation gives a nice introduction to Extending and Embedding Python with C\C++. However, in many cases there's a need to transfer complex data structures between the languages.

What would be the best way to achieve this?


Solution

  • Create your own type and fill the tp_*attr members appropriately.