如果断言成功不采取任何措施(类似语句),否则触发AssertionError(断言错误)的异常。assert的语法如下:
基于24个网页-相关网页
Assertion checking is like exception handling, but no exception is thrown when an assertion fails. Instead, an AssertionError is thrown.
断言检查就象异常处理,但是当断言失败时,却不会抛出异常,而会抛出一个AssertionError。
youdao
应用推荐
模块上移
模块下移
不移动