value.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:pysciter 作者: sciter-sdk 项目源码 文件源码
def length(self) -> int:
        """Return the number of items in the T_ARRAY, T_MAP, T_FUNCTION and T_OBJECT sciter::value."""
        if not self.get_type() in (VALUE_TYPE.T_ARRAY, VALUE_TYPE.T_MAP, VALUE_TYPE.T_FUNCTION, VALUE_TYPE.T_OBJECT):
            raise AttributeError("'%s' has no attribute '%s'" % (self.get_type(), 'length'))
        n = ctypes.c_int32()
        ok = _api.ValueElementsCount(self, byref(n))
        self._throw_if(ok)
        return n.value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号