Terry Reedy <tjre...@udel.edu> writes:

> We love 'assert' so much that we have 20-30 'assertXYZ' variations in
> unittest.

A function will not be disabled by a run-time option to the Python
interpreter.

> The statement 'assert expression' is almost equivalent to
>
> if not expression: raise AssertionError('expression')

With the important difference that this will be active no matter what
options Python's interpreter is run with. That makes it quite a
different proposition from using ‘assert’ statements.

-- 
 \     “You don't need a book of any description to help you have some |
  `\    kind of moral awareness.” —Dr. Francesca Stavrakoloulou, bible |
_o__)                                              scholar, 2011-05-08 |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to