PythonDictionary::PythonDictionary (const PythonObject &object) : PythonObject() { Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a dictionary }
void PythonDictionary::SetItemForKey (const PythonString &key, const PythonObject &value) { if (m_py_obj && key && value) PyDict_SetItem(m_py_obj, key.GetPythonObject(), value.GetPythonObject()); }
void PythonList::AppendItem (const PythonObject &object) { if (m_py_obj && object) PyList_Append(m_py_obj, object.GetPythonObject()); }
void PythonList::SetItemAtIndex (uint32_t index, const PythonObject & object) { if (m_py_obj && object) PyList_SetItem(m_py_obj, index, object.GetPythonObject()); }
PythonList::PythonList (const PythonObject &object) : PythonObject() { Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a list }
PythonInteger::PythonInteger (const PythonObject &object) : PythonObject() { Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a integer type }
PythonString::PythonString (const PythonObject &object) : PythonObject() { Reset(object.GetPythonObject()); // Use "Reset()" to ensure that py_obj is a string }