PyDict_*() refcount assumptions

sndive at gmail.com sndive at gmail.com
Thu Nov 1 02:01:53 CET 2007


i checked this: http://svn.python.org/projects/python/trunk/Doc/data/refcounts.dat
and it seems that
PyDict_SetItem incref the value being added and the key
and PyDict_DelItem does not decrement any refcounts
so i have to do so manually for the key and for the data( by calling
PyDict_GetItem first).
Did i decipher the dat file correctly and is there a wrapper for
DelItem that reverses
the refcounts to what they were before the SetItem or do i have have
to do 2 calls for
deletion?




More information about the Python-list mailing list