It's improper to use the assert keyword to raise an error when a library is mismatched. The assert keyword is to be used to assert internal code correctness. They may be optimized away with -O and -OO optimizer flags. It would be unfortunate if exactly those users looking to run under highly optimized conditions would run into a sneaky library mismatch bug :)
https://github.com/BlueBrain/MorphIO/blob/aec82bfac2744bbae26be5f4ff49717e05c65eb3/morphio/__init__.py#L9
It's improper to use the
assert
keyword to raise an error when a library is mismatched. Theassert
keyword is to be used to assert internal code correctness. They may be optimized away with-O
and-OO
optimizer flags. It would be unfortunate if exactly those users looking to run under highly optimized conditions would run into a sneaky library mismatch bug :)