错误日志:
2011-12-05 14:56:01.211
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'product'
Traceback (most recent call last):
File "/base/data/home/apps/s~ellipt-test/1.355173855249110456/helloworld.py", line 494, in <module>
F16 = field_elements(2, 4)
File "/base/data/home/apps/s~ellipt-test/1.355173855249110456/helloworld.py", line 218, in field_elements
result = list(itertools.product(*([range(p)]*n)))
有什么问题?在我的电脑上,脚本有效!
最佳答案
Your application can run in one of three runtime environments: […] a choice of Python 2.5 or the experimental Python 2.7.
我假设这意味着默认的 Python 是 2.5 版。
New in version 2.6.
我不太熟悉 GAE,所以不确定您如何将您的应用切换为使用 2.7。
关于python - itertools 在 GAE 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8393719/