New submission from Nick Coghlan <ncogh...@gmail.com>: As noted in [1] the refcount data for the C API documentation is contained in a separate file at Doc/data/refcounts.dat.
This file is not mentioned in "Documenting Python" and hence has not been correctly updated for Py3k (e.g. none of the PyString methods have been renamed to PyUnicode in that file, so the relevant refcount changes are not documented correctly). There are several possible improvements to be considered in this area 1. Mention this file and its purpose in "Documenting Python" 2. Update the Sphinx extension to warn if a C API function is not found in this file 3. Update the Sphinx extension to allow this information to be expressed inline in the function definition rather than off in a separate file (if practical) 4. Address Skip's comment from that file by allowing "-0" to indicate stolen references for arguments and "+0" for borrowed references as return values 5. Perhaps add a mechanism to indicate when PyMem_Free needs to be called on a return value or pointer output value. [1] http://mail.python.org/pipermail/python-dev/2010-September/103429.html ---------- messages: 115441 nosy: ncoghlan priority: normal severity: normal status: open title: Fix refcounting details in Py3k C API documentation _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9755> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com