Exemple #1
0
// int PyDict_Update(PyObject *a, PyObject *b)
// This is the same as PyDict_Merge(a, b, 1) in C, or a.update(b) in Python. Return 0 on success or -1 if an exception was raised.
//
// New in version 2.2.
func PyDict_Update(a, b *PyObject) error {
	err := C.PyDict_Update(topy(a), topy(b))
	return int2err(err)
}
Exemple #2
0
// Update replaces key values pairs in d with those from o.  It is equivalent to
// d.Merge(o, true) in Go, or "d.update(o)" in Python.
func (d *Dict) Update(o Object) error {
	ret := C.PyDict_Update(c(d), c(o))
	return int2Err(ret)
}
Exemple #3
0
// Update replaces key values pairs in d with those from o.  It is equivalent to
// d.Merge(o, true) in Go, or "d.update(o)" in Python.
func (d *Dict) Update(o *Base) error {
	ret := C.PyDict_Update(d.c(), o.c())
	return int2Err(ret)
}