2009年12月23日水曜日

例外

例外処理

try:
    raise ValueError(‘error’)
except ValueError, e:
    print e
except IndexError, e:
    print e
except:
    print ‘error’
finally
    print ‘final’

0 件のコメント:

コメントを投稿