正在加载图片...
Raise Exceptions Exceptions are raised with a raise statement raise <expression> <expression>must be an Exception,which is created like so: E.g.,TypeError('Error message') TypeError --A function was passed the wrong number/type of argument NameError --A name wasn't found KeyError--A key wasn't found in a dictionary RuntimeEr ror --Catch-all for troubles during interpretationRaise Exceptions Exceptions are raised with a raise statement raise <expression> <expression> must be an Exception, which is created like so: E.g., TypeError('Error message') TypeError -- A function was passed the wrong number/type of argument NameError -- A name wasn’t found KeyError -- A key wasn’t found in a dictionary RuntimeError -- Catch-all for troubles during interpretation
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有