参考:
http://www.cnblogs.com/herbert/archive/2013/01/12/2857233.html
assert语句,如果没记错,这个东西在C或者C++里面也有的。属于短小的断言。下面的是来自python help document的说明:
Assert statements are a convenient way to insert debugging assertions into a program:
assert语句是一种插入调试断点到程序的一种便捷的方式。
assert语句的使用格式
assert expression
这个语句是等价于下面的个句式: