摘要:
#!/usr/bin/pythonimport tracebacktry:1/0#except Exception,e:#print traceback.format_exc() except Exception as e:print e#!/usr/bin/pythonimport tracebacktry:1/0#except Exception,e:#print traceback.format_exc() except Exception , e:print e Python的异常处理能力是很强大的,可向用户准确反馈出错信息。在Python中,异常也是对象,可对它进行操作。所有异常都是 阅读全文