raise语句

# -*- coding: utf-8 -*-
#python 27
#xiaodeng
#Python学习手册 868
#raise语句


res=[IndexError,TypeError]
#raise res[0]
raise IndexError
'''
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\my.py", line 10, in <module>
    raise IndexError
IndexError
'''

 

posted @ 2015-10-30 14:53  Xiao|Deng  阅读(183)  评论(0编辑  收藏  举报