PyDict_Next doc buglet

montanaro at tttech.com montanaro at tttech.com
Wed Jan 23 05:55:02 EST 2002


    Robin> Looking at the 2.1.2 docs Doc/api/dictObjects.html it is not
    Robin> clear whether the output PyObjects have been borrowed or properly
    Robin> incremented.

It's quite rare in the Python C API to use reference parameters the way
PyDict_Next does.  Fred Drake took a refcounts.dat file I created ages ago
and updated the doc generation to indicate the refcount effect on function
return values of type PyObject *.  I just updated that function's doc
section.  All told, I only counted six functions in the concrete types
section and one in the abstract types section that take PyObject**
parameters.

    Robin> Looking in the code it seems they are borrowed, but isn't it a
    Robin> bug that this isn't made clear in the documentation.

This is correct.

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list