Logo

Programming-Idioms

History of Idiom 123 > diff from v7 to v8

Edit summary for version 8 by Oldboy:
New Python implementation by user [Oldboy]

Version 7

2016-12-13, 20:55:38

Version 8

2017-10-28, 10:54:23

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Code
assert isConsistent
Comments bubble
raises AssertionError Exception.

Running Python with option _-O or with PYTHONOPTIMZE
environment variable suppresses all asserts.