此代码块的后向(如果可能的话)2.6兼容语法是什么(来自PEP 3109):
try:
self.spawn(pp_args)
except DistutilsExecError as msg:
raise CompileError from msg
答案 0 :(得分:0)
这就像你在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