¡@

Home 

python Programming Glossary: py_incref

Writing Python bindings for C++ code that use OpenCV

http://stackoverflow.com/questions/12957492/writing-python-bindings-for-c-code-that-use-opencv

refcount return PyObject o pyObjectFromRefcount refcount Py_INCREF o Py_DECREF o NumpyAllocator g_numpyAllocator enum ARG_NONE..

Is the behaviour of Python's list += iterable documented anywhere?

http://stackoverflow.com/questions/13904493/is-the-behaviour-of-pythons-list-iterable-documented-anywhere

self other if result NULL return result Py_DECREF result Py_INCREF self return PyObject self I've raised a bug report to have the..

How do I propagate C++ exceptions to Python in a SWIG wrapper library?

http://stackoverflow.com/questions/1394484/how-do-i-propagate-c-exceptions-to-python-in-a-swig-wrapper-library

PyErr_NewException _mylibrary.MyException NULL NULL Py_INCREF pMyException PyModule_AddObject m MyException pMyException Step..

PyEval_InitThreads in Python 3: How/when to call it? (the saga continues ad nauseum)

http://stackoverflow.com/questions/15470367/pyeval-initthreads-in-python-3-how-when-to-call-it-the-saga-continues-ad-naus

Python or call anything from the Python API including Py_INCREF just wrap the code in the usual pair of PyGILState_Ensure and..

I want to start reading the Python source code. Where should I start [closed]

http://stackoverflow.com/questions/1728472/i-want-to-start-reading-the-python-source-code-where-should-i-start

source code before you have to understand what is meant by Py_INCREF and so on. I gave a presentation at Pycon explaining the API..

Understanding performance difference

http://stackoverflow.com/questions/17640235/understanding-performance-difference

has additional parts. if result ob_refcnt 1 Py_INCREF result Py_DECREF PyTuple_GET_ITEM result 0 Py_DECREF PyTuple_GET_ITEM.. return NULL di len key ep i .me_key value ep i .me_value Py_INCREF key Py_INCREF value PyTuple_SET_ITEM result 0 key PyTuple_SET_ITEM.. di len key ep i .me_key value ep i .me_value Py_INCREF key Py_INCREF value PyTuple_SET_ITEM result 0 key PyTuple_SET_ITEM result..

How to create a generator/iterator with the Python C API?

http://stackoverflow.com/questions/1815812/how-to-create-a-generator-iterator-with-the-python-c-api

static PyObject Generator_iter PyObject self PyObject args Py_INCREF self return self static PyObject Generator_next PyObject self.. for ... in ... . PyObject spam_MyIter_iter PyObject self Py_INCREF self return self Implementation of our iteration next method... spam_MyIterType 0 return m Py_InitModule spam SpamMethods Py_INCREF spam_MyIterType PyModule_AddObject m _MyIter PyObject spam_MyIterType..

Are strings pooled in Python

http://stackoverflow.com/questions/2519580/are-strings-pooled-in-python

str UCHAR_MAX NULL #ifdef COUNT_ALLOCS one_strings #endif Py_INCREF op return PyObject op ... So a str num b str num print a is..

How do you extend python with C++?

http://stackoverflow.com/questions/2847617/how-do-you-extend-python-with-c

self PyObject args if PyArg_ParseTuple args return NULL Py_INCREF Py_None return Py_None static PyMethodDef Flp_methods demo PyCFunction.. v PyDict_GetItemString self x_attr name if v NULL Py_INCREF v return v return Py_FindMethod Flp_methods PyObject self name.. args O list return NULL item PyList_GetItem list 0 Py_INCREF item PyList_SetItem list 1 PyInt_FromLong 0L PyObject_Print..

izip_longest in itertools: How does rasing IndexError inside the iterator work?

http://stackoverflow.com/questions/7392902/izip-longest-in-itertools-how-does-rasing-indexerror-inside-the-iterator-work

lz numactive 0 Py_DECREF result return NULL else Py_INCREF lz fillvalue item lz fillvalue PyTuple_SET_ITEM lz ittuple..