2012-01-17 6 views

答えて

11

はい、exceptasの構文を使用します。以前のバージョンのPythonで

try: 
    raise Exception("hello world") 
except Exception as x: 
    print(x) 

を、これはあなたが随時表示される場合がありexcept Exception, x:を書かされるだろう。

+0

素晴らしい感謝! –

関連する問題