no Py_DECREF of PyModule_GetDict return?

Lance lbrannma at cablespeed.com
Wed Dec 25 16:06:32 EST 2002


Hi All,

I'm running example 20-5 in Mark Lutz's Programming Python.

Three Python objects are created in C, pmod, pdict, and pstr. However, only
the pmod and pstr reference counts are decremented.

Does anyone know why there's no

Py_DECREF(pdict);

where

pdict = PyModule_GetDict(pmod);

Thanks in advance,
Lance





More information about the Python-list mailing list