Catch several exceptions,severalexceptions,class MyErro
Catch several exceptions,severalexceptions,class MyErro
class MyError: passdef oops(): raise MyError()def doomed(): try: oops() except IndexError: print 'caught an index error!' except MyError, data: print 'caught error:', MyError, data else: print 'no error caught...'if __name__ == '__main__': doomed()
- Loop over two or more sequences at the same time,loops
- Exception handlers handle Exceptions occur inside functi
- Draw Arc,drawarc,from Tkinter
- Indexing a single-item tuple,single-itemtuple,print (
- User-defined Exceptions: Name their own exceptions by cr
- This is a simple web tree checker, useful to find bad li
热门文章:
相关内容
- Loop over two or more sequences at the same time,loopsequences,# Lo
- Exception handlers handle Exceptions occur inside functions.,handle
- Draw Arc,drawarc,from Tkinter
- Indexing a single-item tuple,single-itemtuple,print ('x',
- User-defined Exceptions: Name their own exceptions by creating a new
- This is a simple web tree checker, useful to find bad links in a web
- Map: lambda function inside,maplambda,foo = [2, 18
- Python模拟http post,python模拟post,import sys,
- oct and hex function,octhex,print oct(64
- Intelligent diff between text files (Tim Peters),diffpeters,#! /usr
评论关闭