3
什麼是落後(2.6如果可能的話),這個代碼塊的兼容語法(從PEP 3109):製作蟒蛇3例外向後兼容
try:
self.spawn(pp_args)
except DistutilsExecError as msg:
raise CompileError from msg
什麼是落後(2.6如果可能的話),這個代碼塊的兼容語法(從PEP 3109):製作蟒蛇3例外向後兼容
try:
self.spawn(pp_args)
except DistutilsExecError as msg:
raise CompileError from msg
這是接近你會來在python-2。 x:
try:
self.spawn(pp_args)
except DistutilsExecError as msg:
print "DistutilsExecError : " + str(DistutilsExecError(msg))
print
print "The above exception was the direct cause of the following exception:"
raise CompileError