示例#1
0
文件: dict.go 项目: gbbr/textmate
// 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)
}
示例#2
0
文件: dict.go 项目: 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)
}
示例#3
0
文件: dict.go 项目: remh/go-python
// 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)))
}