语句 assert x >= 0; 即为断言,断言条件 x >= 0 预期为 true 。如果计算结果为 false ,则断言失败,抛出 AssertionError 。 使用 assert 语句时,还可以添加一个 ...
確定! 回上一頁