C++ type conversion Python wrapper