예제 #1
0
파일: dict.go 프로젝트: remh/go-python
// 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)
}
예제 #2
0
파일: dict.go 프로젝트: gbbr/textmate
// 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)
}
예제 #3
0
파일: dict.go 프로젝트: MogeiWang/py
// 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)
}