python 的 array 模块生成对象时报错

python 的 array 模块生成对象时报错

array 模块可以加载,但生成对象时报错。

Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import array
>>> array([1,2,3])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable
>>>


谢谢!
http://bbs.chinaunix.net/viewthr ... p;extra=&page=2
ok 了。谢谢楼上!

[Copy to clipboard] [ - ]
CODE:
>>> from array import *
>>> array('i',[1,2,3])
array('i', [1, 2, 3])
>>>