斷言的使用

>>> 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
>>> 
相關文章
相關標籤/搜索