在Python 中要進行斷言測試,可以使用 assert 陳述句: ... raise RuntimeError('balance not enough') a = Account('E122', 'Justin') a.deposit(-1) ...
確定! 回上一頁