<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>I tried this, <br>>>> import array<br>>>> from array import array<br>>>> arr=array('i',[5,7,8])<br>>>> arr.sg_length<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>AttributeError: 'array.array' object has no attribute 'sg_length'<br>>>> arr=array('i'[5,8,7])<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>TypeError: string indices must be integers<br>>>> arr=array('i',[5,8,7])<br>>>> arr.length<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>AttributeError: 'array.array' object has no attribute 'length'<br>>>> arr.length()<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in
 <module><br>AttributeError: 'array.array' object has no attribute 'length'<br>>>> length(arr)<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>NameError: name 'length' is not defined<br>>>> array_length(arr)<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>NameError: name 'array_length' is not defined<br>>>> arr.array_length()<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>AttributeError: 'array.array' object has no attribute 'array_length'<br>>>> arr.array_length<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>AttributeError: 'array.array' object has no attribute 'array_length'<br><br>I'm trying to call this function, http://hg.python.org/cpython/file/3b7230997425/Modules/arraymodule.c#l657<br><br>Is that
 possible to call that function?<br><br>I know it's possible to do:<br>>>>len(arr)<br>>>>arr.itemsize<br><br>Any asnwer will be highly appreciated.<br><br>Thanks.<br></td></tr></table>