以下是导致错误的片段:
net.grinder.scriptengine.jython.JythonScriptExecutionException: SyntaxError: ('invalid syntax', ('C:\grinder-3.7.1\lib
\.\nb-romg-file-store\current\grinder_test.py', 131, 9, ' finally:'))
ss = ''
self._suggestionLock.acquire()
try:
ss = suggestion_strings.next()
except StopIteration:
suggestion_strings = suggestions_generator()
ss = suggestion_strings.next()
finally:
self._suggestionLock.release()
这里可能出了什么问题?
您正在使用Jython 2.4吗?try/except/finally是在Python2.5中引入的。
Jython只支持Python 2.4;在2.5中加入CCD_ 1。