首页 » Posts tagged with "except"
果子MM (21)

python捕获异常的三种方式

Date:2013-06-06Author:felix.chanCategory:python编程Comment:0

python捕获异常的三种方式: 1、 try: a = 1/0 except Exception,err: print(Exception,err) 2、 import traceback try: a = 1/0 except : print(traceback.print_exc()) 3、 import sys try: ...

Continue