

To get error reporting use PyDict_GetItemWithError() instead.

Note that exceptions which occur while calling _hash_() and If the key key is not present, but without setting an exception. Return the object from dictionary p which has a key key. PyObject* PyDict_GetItem ( PyObject *p, PyObject *key ) Return value: Borrowed reference. Remove the entry in dictionary p which has a key specified by the string Int PyDict_DelItemString ( PyObject *p, const char *key ) Remove the entry in dictionary p with key key. Int PyDict_DelItem ( PyObject *p, PyObject *key ) Insert value into the dictionary p using key as a key. Int PyDict_SetItemString ( PyObject *p, const char *key, PyObject *val ) Hashable if it isn’t, TypeError will be raised. Insert value into the dictionary p with a key of key. Int PyDict_SetItem ( PyObject *p, PyObject *key, PyObject *val ) Return a new dictionary that contains the same key-value pairs as p. PyObject* PyDict_Copy ( PyObject *p ) Return value: New reference.


This is equivalent to the Python expression key in p. Int PyDict_Contains ( PyObject *p, PyObject *key )ĭetermine if dictionary p contains key. Prevent modification of the dictionary for non-dynamic class types.Įmpty an existing dictionary of all key-value pairs. This is normally used to create a view to Return a types.MappingProxyType object for a mapping whichĮnforces read-only behavior. PyObject* PyDictProxy_New ( PyObject *mapping ) Return value: New reference. Return a new empty dictionary, or NULL on failure. PyObject* PyDict_New ( ) Return value: New reference. Return true if p is a dict object, but not an instance of a subtype of Return true if p is a dict object or an instance of a subtype of the dict This is the same object as dict in the Python layer. This instance of PyTypeObject represents the Python dictionary This subtype of PyObject represents a Python dictionary object.
