這不是重複的,因爲我使用python 2.7.6,而不是3爲什麼是無效的語法錯誤打印「%s沒有在%s存在%s」的<----%(
我使用的是從V8源回購the script,它給我的錯誤:
D:\v8\source\v8\tools\dev>v8gen.py x64.release
File "D:\v8\source\v8\tools\dev\v8gen.py", line 147
print '%s does not exist in %s for %s' % (
^
SyntaxError: invalid syntax
文件本身應該罰款,因爲它的工作在其他環境中,可能是Linux,但我跑該腳本來自Windows 10本地shell(cmd)。
我不熟悉python,有人可以提出什麼可能是錯的嗎?
我們就需要看到更多的代碼。你的打印參數是否有尾括號?你試圖打印的確切值是3? – NuclearPeon
[「Good Code」上的SyntaxError](http://stackoverflow.com/documentation/python/9300/commonwealth-exceptions/30292/syntax-error-on-good-code#t=201705041812501801264) – TemporalWolf
@NuclearPeon,I'已經鏈接到實際的文件內容,[這裏又是](https://chromium.googlesource.com/v8/v8.git/+/master/tools/dev/v8gen.py#147) –