Ejemplo n.º 1
0
// Size returns the number of items in the dictionary d.  This is equivalent to
// the Python "len(d)".
func (d *Dict) Size() int64 {
	ret := C.PyDict_Size(c(d))
	if ret < 0 {
		panic(exception())
	}
	return int64(ret)
}
Ejemplo n.º 2
0
Archivo: dict.go Proyecto: MogeiWang/py
// Size returns the number of items in the dictionary d.  This is equivalent to
// the Python "len(d)".
func (d *Dict) Size() int {
	ret := C.PyDict_Size(d.c())
	if ret < 0 {
		panic(exception())
	}
	return int(ret)
}
Ejemplo n.º 3
0
// Changed in version 2.5: This function returned an int type. This might require changes in your code for properly supporting 64-bit systems.
func PyDict_Size(self *PyObject) int {
	return int(C.PyDict_Size(topy(self)))
}