assert 1==2,("断言错误")
相当于:
if not 1==2: raise AssertionError("断言错误!")
python中的assert
原文:https://www.cnblogs.com/yibeimingyue/p/11416165.html