Example #1
0
// PyObject* PyDict_Copy(PyObject *p)
// Return value: New reference.
// Return a new dictionary that contains the same key-value pairs as p.
//
// New in version 1.6.
func PyDict_Copy(self *PyObject) *PyObject {
	return togo(C.PyDict_Copy(topy(self)))
}
Example #2
0
// Copy returns a new dictionary that contains the same key-values pairs as d.
//
// Return value: New Reference.
func (d *Dict) Copy() (Object, error) {
	ret := C.PyDict_Copy(c(d))
	return obj2ObjErr(ret)
}
Example #3
0
File: dict.go Project: MogeiWang/py
// Copy returns a new dictionary that contains the same key-values pairs as d.
//
// Return value: New Reference.
func (d *Dict) Copy() (*Base, error) {
	ret := C.PyDict_Copy(d.c())
	return obj2ObjErr(ret)
}