python中的异常捕获怎么用?

http://www.2cto.com/kf/201301/184121.html

http://www.w3cschool.cc/python/python-exceptions.html

 

try:   
    a=b   
    b=c   
except Exception,e:   #except后面加异常种类
    print Exception,":",e   
 
try: 
    a=b 
    b=c 
except Exception,e: 
    print Exception,":",e 
posted @ 2015-04-08 11:22  Xander-Hang  阅读(245)  评论(0编辑  收藏  举报