// int PyDict_DelItem(PyObject *p, PyObject *key) // Remove the entry in dictionary p with key key. key must be hashable; if it isn’t, TypeError is raised. Return 0 on success or -1 on failure. // int PyDict_DelItemString(PyObject *p, char *key) // Remove the entry in dictionary p which has a key specified by the string key. Return 0 on success or -1 on failure. func PyDict_DelItem(self, key *PyObject) error { err := C.PyDict_DelItem(topy(self), topy(key)) return int2err(err) }
// DelItem removes the entry with the key of "key" from the dictionary d. If // "key" is not hashable, a TypeError is returned. func (d *Dict) DelItem(key Object) error { ret := C.PyDict_DelItem(c(d), c(key)) return int2Err(ret) }
// DelItem removes the entry with the key of "key" from the dictionary d. If // "key" is not hashable, a TypeError is returned. func (d *Dict) DelItem(key *Base) error { ret := C.PyDict_DelItem(d.c(), key.c()) return int2Err(ret) }