Why assert is not largely used?
I guess the main reason for assert not being used more often is that nobody uses Python’s “optimized” mode. Asserts are a great tool to detect programming mistakes, to guard yourself from unexpected situations, but all this error checking comes with a cost. In compiled languages such as C/C++, this does not really matter, since … Read more