Should I pass py::list
or py::list&
to my function
#5379
-
I'm trying to do some processing on a long Python list of long strings in C++, and so I have a C++ object whose constructor I'd like to take in a Python list, get an owning reference to it, and then start asynchronously doing processing on the list with the GIL released. However, I don't know whether I should type the Python list in the C++ constructor as Theoretically, a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Try py::list |
Beta Was this translation helpful? Give feedback.
Try py::list