How to print a dictionary in python c api function

Posted by dizgam on Stack Overflow See other posts from Stack Overflow or by dizgam
Published on 2010-05-20T07:37:09Z Indexed on 2010/05/20 7:40 UTC
Read the original article Hit count: 239

Filed under:

PyObject* dict = PyDict_New(); PyDict_SetItem(dict, key, value);

PyDict_GetItem(dict, key);

Bus error if i use getitem function otherwise not.

So Want to confirm that the dictionary has the same values which i have set. Other than using PyDict_GetItem function, Is there any other method to print the values of the dictionary?

© Stack Overflow or respective owner

Related posts about python