【发布时间】:2015-09-10 19:59:39
【问题描述】:
我在下面的代码中由于某种原因在except httplib.IncompleteRead, e: 行中收到错误SyntaxError: invalid syntax。它的Python 3.4:
import httplib
import xlrd
import urllib
try:
url = 'http://www.bankofcanada.ca/stats/results/xls'
#In case of http.client.IncompleteRead Error
except httplib.IncompleteRead, e:
spot_curve = e.partial
short_end_spot_curve = e.partial
【问题讨论】:
-
哪个版本的 Python?应该是
except httplib.IncompleteRead as e:
标签: python