When dealing with C extensions with Python, what is the best way to move data from a C++ array or vector into a PyObject/PyList so it can be returned to Python? 
The method I am using right now seems a bit clunky. I am looping through each element and calling Py_BuildValue to append values to a PyList. 
Is there something similar to memcpy?
You have to construct a PyObject from each element prior to adding it to a sequence.
So you have to either add them one by one, or convert them all, then pass to a constructor from PyObject[].
I guess the 2nd way is slightly faster since it doesn't have to adjust the sequence's member variables after each addition.
Best way to copy C++ buffer to Python