Extending Python with C Beginner's Question

Jerome Chan eviltofu at rocketmail.com
Wed Aug 9 12:18:16 EDT 2000


If I create a dictionary of ints and a list of ints with Py_BuildValue, 
do I need to increment the reference count of the list before returning 
it from a C function?

return Py_Build("{s:i, s:[i,i,i]}", 
    "ID",id,
    "Loc",loc,
    "AC",ac,
    "HP",hp);



More information about the Python-list mailing list