コード例 #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)))
}