def __init__(self, size):
assert size > 0, "Array size must be > 0"
self._size = size
# Create the array structure using the ctypes module
PyArrayType = ctypes.py_object * size
self._elements = PyArrayType()
# Initialize each element.
self.clear(None)
# Returns the size of the array
array_class.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录