我得到一個意外的python執行行爲。 if True:
print("Hello")
else:
I am an error. what can you do about it?
現在,此代碼不會引發SyntaxError,因爲控件永遠不會進入else語句。在像C++這樣的編譯語言中,它會得到一個錯誤。即使在Java中,未使用的代碼也是一個錯誤。但不是在Python中。
我試圖找到每一個實際需要運行要求火炬庫 test.lua一個Lua腳本庫: #!/usr/bin/env lua
print "Welcome to LUA"
print('_VERSION = ' .. _VERSION)
require("nn") -- this loads torch nn libraries to be further used in the code
prin