國際熱核實驗堆函數例如在python docs:Python對 「ITER」 功能,例如給我的TypeError
with open("mydata.txt") as fp:
for line in iter(fp.readline):
print line
給了我這樣的:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
TypeError: 'builtin_function_or_method' object is not iterable
這怎麼可能? (Python的2.6.4)
+1:雖然我不會用* stupid *這個詞。 :)順便說一句,如果你解決了自己的問題,仍然鼓勵接受正確的答案(你自己的),使用左邊的勾號。 – 2010-11-16 12:25:18
誰降低了這個?請解釋。 – 2010-11-16 12:26:55
Space_C0wb0y,我想:「你可以接受你自己的答案在2天內」。 – 2010-11-16 12:38:17