在 Python 2.6+ 中,您可以像这样处理异常:
try:
# stuff
except Exception as e:
return 'exception %s' % type(e)
2.5中的等价物是什么?
在 Python 2.6+ 中,您可以像这样处理异常:
try:
# stuff
except Exception as e:
return 'exception %s' % type(e)
2.5中的等价物是什么?