2024-06-24 08:15:43 发布
网友
此代码块(来自PEP 3109)的向后(如果可能,为2.6)兼容语法是什么:
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
这与您在python-2.x中看到的非常接近:
相关问题 更多 >
编程相关推荐