断言的使用

>>> x = 1
>>> y = 2
>>> assert x == y, "not equals"

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    assert x == y, "not equals"
AssertionError: not equals
>>> 
相关文章
相关标签/搜索